Object swing control method and device, equipment and storage medium

By dynamically calculating the swing constraint information and next position information of each sub-object of the chain or rope, the continuous swing of the chain or rope is realized, solving the problems of fixed swing animations, large storage space, and low reusability in the prior art, and improving the gaming experience and performance.

CN119587982APending Publication Date: 2025-03-11NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411666516.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, the swing animation of the chain or rope in the game is fixed, resulting in poor game experience for players, occupying large storage space, and not having high reusability.

Method used

By obtaining the current position information of each sub-object in the object to be swung, determining the current swing constraint information of each sub-object based on the current position information and the previous position information, and the position information of adjacent sub-objects, and then calculating its next position information to achieve a continuous swing effect.

Benefits of technology

Improves the continuity and reality of the chain or rope swing process in the game, reduces storage space usage, and improves reusability and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119587982A_ABST
    Figure CN119587982A_ABST
Patent Text Reader

Abstract

The invention provides an object swing control method and device, equipment and a storage medium, and the method comprises the steps: obtaining the current position information of each sub-object in a to-be-swung object; determining the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object and the current position information of the adjacent sub-object of each sub-object; determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object; and according to the next position information of each sub-object, rendering and displaying the object to be swung in the next frame of the current frame. According to the method and the device, the next frame of swinging can be performed on the basis of the current frame, the continuity of the to-be-swung object in the swinging process is ensured, the to-be-swung object more simulates the real physical gravity in the swinging process, the sense of reality of the to-be-swung object in the swinging process in the game process is enhanced, and the game experience of players is improved. And meanwhile, the calculation is simple.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game control technology, and in particular to an object swing control method, device, equipment and storage medium. Background Art

[0002] In interactive games, such as match-3 mobile games, game assets such as chains or ropes are usually displayed on the interface so that players can achieve the effect of hitting the chains or ropes by eliminating them during the game, thereby improving the player's gaming experience.

[0003] In the prior art, when a chain or a rope is hit, a preset animation can be played to achieve the swing of the chain or the rope.

[0004] However, this processing method can only present fixed animations, which does not provide a good gaming experience for players. At the same time, the corresponding animations need to be prepared in advance, which takes up a large storage space and has low reusability. Summary of the invention

[0005] The purpose of this application is to provide an object swing control method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problems in the prior art of poor player gaming experience, large storage space occupation and low reusability.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for controlling object swing, the method comprising:

[0008] Acquire current position information of each sub-object in the object to be swung, wherein the sub-objects in the object to be swung are arranged in sequence according to a preset order, and the current position information is used to indicate the position of the sub-object in the current frame;

[0009] Determine current swing constraint information of each sub-object according to current position information and previous position information of each sub-object, as well as current position information of adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in a frame previous to the current frame;

[0010] Determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, wherein the next position information is used to indicate the position of the sub-object in the next frame of the current frame;

[0011] According to the next position information of each sub-object, the object to be swung is rendered and displayed in a frame next to the current frame.

[0012] As a possible implementation, the current swing constraint information of each sub-object is determined according to the current position information and the previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object, including:

[0013] Determine first constraint information of the first sub-object according to current position information and previous position information of the first sub-object, the first sub-object being any sub-object of the object to be swung; and / or,

[0014] Second constraint information of the first sub-object is determined according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object.

[0015] As a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate;

[0016] The determining the first constraint information of the first sub-object according to the current position information and the previous position information of the first sub-object includes:

[0017] The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

[0018] As a possible implementation, the current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; the current position information of the second sub-object includes: a third position coordinate;

[0019] The determining the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object includes:

[0020] The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information, where the second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

[0021] As a possible implementation, the current position information includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object and a subsequent sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the subsequent sub-object includes: a fourth position coordinate;

[0022] The determining the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object includes:

[0023] The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

[0024] As a possible implementation manner, determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object includes:

[0025] The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0026] As a possible implementation manner, determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object includes:

[0027] The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0028] As a possible implementation manner, determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object includes:

[0029] Superimposing the first constraint information onto the current position information of the first sub-object to obtain the next candidate position information of the first sub-object;

[0030] Obtaining the next candidate position information of the second sub-object;

[0031] Determining third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object;

[0032] The next position information of the first sub-object is determined according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

[0033] As a possible implementation, the next candidate position information of the first sub-object includes: the fifth position coordinates; the next candidate position information of the second sub-object includes: the sixth position coordinates;

[0034] The determining the third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object includes:

[0035] The sixth position coordinate is subtracted from the fifth position coordinate to obtain a fifth vector, and the fifth vector is used as the third constraint information.

[0036] As a possible implementation manner, determining the next position information of the first sub-object according to the third constraint information, the second constraint information, and the next candidate position information of the first sub-object includes:

[0037] If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

[0038] As a possible implementation manner, determining the next position information of the first sub-object according to the third constraint information, the second constraint information, and the next candidate position information of the first sub-object includes:

[0039] If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0040] As a possible implementation manner, after determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, the method further includes:

[0041] According to the current position information and the next position information of each sub-object, the rendering parameters of each sub-object in the next frame are determined, and the rendering parameters include: moving speed and / or rotation angle.

[0042] As a possible implementation, determining the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object includes:

[0043] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0044] The moving speed of the first sub-object in the next frame is determined according to the moving length information and the preset refresh time.

[0045] As a possible implementation, determining the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object includes:

[0046] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0047] The rotation angle of the first sub-object in the next frame is calculated according to the movement length information.

[0048] As a possible implementation manner, rendering and displaying the object to be swung in a frame next to the current frame according to the next position information of each sub-object includes:

[0049] The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0050] As a possible implementation manner, the step of obtaining the current position information of each sub-object in the object to be swung includes:

[0051] According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is acquired in sequence.

[0052] As a possible implementation method, it also includes:

[0053] If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in a frame next to the current frame, wherein the preset style is used to indicate that the object to be swung falls.

[0054] In a second aspect, another embodiment of the present application provides an object swing control device, the device comprising:

[0055] An acquisition module, used for acquiring current position information of each sub-object in the object to be swung, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order, and the current position information is used for indicating the position of the sub-object in the current frame;

[0056] A swing constraint determination module, used to determine current swing constraint information of each sub-object according to current position information and previous position information of each sub-object, and current position information of adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in the frame previous to the current frame;

[0057] A position determination module, used to determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, wherein the next position information is used to indicate the position of the sub-object in the next frame of the current frame;

[0058] The rendering and display module is used to render and display the object to be swung in a frame next to the current frame according to the next position information of each sub-object.

[0059] As a possible implementation, the swing constraint determination module is specifically used to:

[0060] Determine first constraint information of the first sub-object according to current position information and previous position information of the first sub-object, the first sub-object being any sub-object of the object to be swung; and / or,

[0061] Second constraint information of the first sub-object is determined according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object.

[0062] As a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate;

[0063] The swing constraint determination module is specifically used for:

[0064] The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

[0065] As a possible implementation, the current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; the current position information of the second sub-object includes: a third position coordinate;

[0066] The swing constraint determination module is specifically used for:

[0067] The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information, where the second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

[0068] As a possible implementation, the current position information includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object and a subsequent sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the subsequent sub-object includes: a fourth position coordinate;

[0069] The swing constraint determination module is specifically used for:

[0070] The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

[0071] As a possible implementation manner, the location determination module is specifically used to:

[0072] The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0073] As a possible implementation manner, the location determination module is specifically used to:

[0074] The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0075] As a possible implementation manner, the location determination module is specifically used to:

[0076] Superimposing the first constraint information onto the current position information of the first sub-object to obtain the next candidate position information of the first sub-object;

[0077] Obtaining the next candidate position information of the second sub-object;

[0078] Determining third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object;

[0079] The next position information of the first sub-object is determined according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

[0080] As a possible implementation, the next candidate position information of the first sub-object includes: the fifth position coordinates; the next candidate position information of the second sub-object includes: the sixth position coordinates;

[0081] The position determination module is specifically used for:

[0082] The sixth position coordinate is subtracted from the fifth position coordinate to obtain a fifth vector, and the fifth vector is used as the third constraint information.

[0083] As a possible implementation manner, the location determination module is specifically used to:

[0084] If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

[0085] As a possible implementation manner, the location determination module is specifically used to:

[0086] If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0087] As a possible implementation, after the position determination module, a rendering parameter determination module is further included, wherein the rendering parameter determination module is used to:

[0088] According to the current position information and the next position information of each sub-object, the rendering parameters of each sub-object in the next frame are determined, and the rendering parameters include: moving speed and / or rotation angle.

[0089] As a possible implementation manner, the rendering parameter determination module is specifically used to:

[0090] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0091] The moving speed of the first sub-object in the next frame is determined according to the moving length information and the preset refresh time.

[0092] As a possible implementation manner, the rendering parameter determination module is specifically used to:

[0093] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0094] The rotation angle of the first sub-object in the next frame is calculated according to the movement length information.

[0095] As a possible implementation, the rendering and display module is specifically used for:

[0096] The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0097] As a possible implementation, the acquisition module is specifically used to:

[0098] According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is acquired in sequence.

[0099] As a possible implementation, the invention further includes: a swing stopping module, wherein the swing stopping module is used to:

[0100] If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in a frame next to the current frame, wherein the preset style is used to indicate that the object to be swung falls.

[0101] In the third aspect, another embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.

[0102] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.

[0103] The beneficial effects of the present application are as follows: by acquiring the current position information of each sub-object in the object to be swung, and determining the current swing constraint information of each sub-object based on the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object, the next position information of each sub-object can be determined based on the current position information and the current swing constraint information of each sub-object, so that the object to be swung can be rendered and displayed in the next frame of the current frame based on the next position information of each sub-object, so that when the object to be swung is swung, it can swing in the next frame based on the current frame, thereby ensuring the continuity of the object to be swung during the swinging process, and by determining the next position information of each sub-object through the current swing constraint information, the object to be swung can better simulate the real physical gravity during the swinging process, thereby enhancing the realism of the object to be swung during the swinging process during the game, and improving the player's gaming experience.

[0104] At the same time, since the present application only needs to calculate the current swing constraint information and the next position information before the next frame swings, the present application also has the advantages of simple calculation, does not require a large memory space, and has low performance consumption. In addition, since the present application only needs to obtain the current position information to perform swing control, the present application has high reusability and can be extended to any scenario where the object to be swung needs to be swung, without being limited by the shape and size of the object to be swung. BRIEF DESCRIPTION OF THE DRAWINGS

[0105] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0106] Figure 1 A schematic diagram of a graphical user interface provided in an embodiment of the present application;

[0107] Figure 2 Another schematic diagram of a graphical user interface provided in an embodiment of the present application;

[0108] Figure 3 A schematic diagram of a flow chart of an object swing control method provided in an embodiment of the present application;

[0109] Figure 4 A schematic diagram of determining first constraint information of a first sub-object in the object swing control method provided in an embodiment of the present application;

[0110] Figure 5 A schematic diagram of determining second constraint information of a first sub-object in the object swing control method provided in an embodiment of the present application;

[0111] Figure 6 Another schematic diagram of determining the second constraint information of the first sub-object in the object swing control method provided in the embodiment of the present application;

[0112] Figure 7 A schematic diagram of a flow chart for determining the next position information of each sub-object in the object swing control method provided in an embodiment of the present application;

[0113] Figure 8 A schematic diagram of a flow chart of determining rendering parameters of each sub-object in the next frame in the object swing control method provided in an embodiment of the present application;

[0114] Fig. 9Another schematic diagram of a flow chart of determining rendering parameters of each sub-object in the next frame in the object swing control method provided in an embodiment of the present application;

[0115] Fig.10 A schematic diagram of an object swing control device provided in an embodiment of the present application;

[0116] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0117] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0118] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0119] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0120] In interactive games, such as match-3 mobile games, game assets such as chains or ropes are usually displayed on the game interface so that players can achieve the effect of hitting the chains or ropes by eliminating them during the game, thereby improving the player's gaming experience.

[0121] In the prior art, when a chain or rope is hit, a preset animation can be played to make the chain or rope swing. In the prior art, a rigid body component can be mounted on the chain or rope in the object to be swung in the two-dimensional physics system (Physics2D) of the Unity engine to make them generate physical properties, and then a pull script control is added to the pendant to control the swing of the chain.

[0122] However, this processing method of playing preset animations can only present fixed animation effects, which greatly limits the interactive performance and personalized experience of players in the game. It lacks sufficient attraction and immersion for players, making it difficult to maintain players' long-term interest and participation. At the same time, the corresponding animations need to be prepared in advance, which means that corresponding animation files need to be pre-designed and produced for each possible scene and action. This approach requires a lot of time and resources to create and optimize animations, and because these animation files usually have a high amount of data and complexity, they also take up a large storage space. More importantly, since the situations and player behaviors in the game are often diverse and unpredictable, these carefully crafted animations are likely to be used only in specific and limited contexts, resulting in low reusability. This not only causes a waste of resources, but also limits the game's ability to dynamically adapt to player behavior and provide rich and varied experiences.

[0123] However, this processing method of mounting rigid body components can only achieve a relatively objective swinging effect when the chain or rope is short. When the length of the chain or rope exceeds a certain length, the swinging effect presented will be far from the actual physical swinging effect. At the same time, when refreshing the level in the game interface, the chain or rope will break and jam, and because multiple rigid body components are mounted, it will generate large performance consumption and storage space in actual application. In addition, the swinging effect presented by the processing method of mounting rigid body components will not be superimposed as multiple groups of game icons are eliminated, that is, it does not support multiple cumulative strikes on the pendant.

[0124] Therefore, the existing methods for processing swinging objects all have the problems of poor gaming experience, occupying a large storage space, generating a large performance consumption, and low reusability.

[0125] Based on the above problems, the embodiment of the present application proposes an object swing control method, which obtains the current position information of each sub-object in the object to be swung, and determines the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object, and can determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, so that the object to be swung can be rendered and displayed in the next frame of the current frame according to the next position information of each sub-object, so that when the object to be swung is swung, it can swing the next frame on the basis of the current frame, thereby ensuring the continuity of the object to be swung during the swinging process, and determining the next position information of each sub-object through the current swing constraint information, so that the object to be swung can simulate the real physical gravity more during the swinging process, enhance the realism of the object to be swung during the swinging process during the game, and improve the game experience of the player. At the same time, the calculation is simple, the reusability is high, and it can be extended to any scene where the object needs to be swung.

[0126] First, an example description is given of the application scenario of the object swing control method provided in the embodiment of the present application.

[0127] In one embodiment of the present disclosure, the object swing control method can be run on a local terminal device or a server. When the object swing control method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0128] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the object swing control method are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0129] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0130] In a possible implementation, an embodiment of the present invention provides an object swing control method, which provides a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above.

[0131] In order to enable those skilled in the art to use the contents of this application, the following implementation methods are provided in combination with the specific application scenario of "match-3 mobile games". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the match-3 mobile game scenario, it should be understood that this is only an exemplary embodiment, and this application can be applied to any other scenario. For example, this application can be applied to "action adventure games", "business simulation games", "shooting games", etc.

[0132] Optionally, Figure 1 A schematic diagram of a graphical user interface provided in an embodiment of the present application, referring to Figure 1 As shown, the graphical user interface may include an interface for items to be eliminated and an interface for asset swinging. The interface for items to be eliminated displays multiple draggable game icons. The interface for asset swinging displays a background pattern and at least one object to be swung. The object to be swung may include a chain or a rope, and a pendant hanging at the bottom of the chain or rope, and the pendant displays the number of items to be eliminated related to the game icon, and the pattern of the pendant corresponds to the pattern of the game icon.

[0133] Optionally, the object to be swung includes a chain and a pendant suspended at the bottom of the chain. The chain can be composed of a plurality of chain beads arranged in sequence according to a preset order, and the pendant is arranged after the last chain bead, thereby forming the object to be swung.

[0134] Optionally, the object to be swung can be displayed at the center of the asset swing interface to improve the aesthetics of the graphical user interface. When there are multiple objects to be swung, the multiple objects to be swung can also be evenly distributed in the asset swing interface to ensure aesthetics while avoiding collisions between the multiple objects to be swung.

[0135] Exemplarily, when the object to be swung is displayed at the center position of the asset swing interface, the length of the chain in the object to be swung can be close to half the width of the asset swing interface, that is, the head of the chain can be set at the center position of the upper boundary line of the asset swing interface, and the tail of the chain can be set at a position close to the center position of the asset swing interface, so that the pendant can be displayed at the center position of the asset swing interface.

[0136] Optionally, the player needs to eliminate game icons with the same pattern as the pendant, so as to update the number of objects to be eliminated in the pendant, and when the number of objects to be eliminated in the pendant is zero, the objects to be swung and the background pattern can be updated accordingly, so that the player can enter the next level.

[0137] For example, continue to refer to Figure 1 As shown, the player can swap the position of the "smiley face" game icon in the second row and third column with the "heart-shaped" game icon in the first row and third column by dragging. After the swap is completed, the "smiley face" game icons in the first row and third column, the first row and fourth column, and the first row and fifth column are eliminated as the first group of game icons. Moreover, after the first group of "smiley face" game icons are eliminated, the local terminal device or the server can control the first group of game icons to move in the graphical user interface to the position of the pendant of the object to be swung in sequence, strike the pendant in sequence, and execute the object swing control method provided in the embodiment of the present application, so that the object to be swung can present a swinging effect after being struck in the graphical user interface.

[0138] For example, Figure 2 Another schematic diagram of a graphical user interface provided in an embodiment of the present application, referring to Figure 2 As shown, in Figure 1On the basis of this, during the swinging process of the object to be swung after the first group of "smiley face" game icons are eliminated, the player can also exchange the position of the "smiley face" game icon in the second row and seventh column with the "lightning" game icon in the third row and seventh column by dragging. After the exchange is completed, the "smiley face" game icons in the third row and seventh column, the fourth row and seventh column, and the fifth row and seventh column are eliminated as the second group of game icons, and after the second group of "smiley face" game icons are eliminated, the local terminal device or the server can control the second group of game icons to move to the position of the pendant of the object to be swung in the graphical user interface in sequence, strike the pendant in sequence, and execute the object swinging control method provided in the embodiment of the present application, so that the object to be swung can present a swinging effect after being struck by the second group of game icons in the graphical user interface on the basis of being struck by the first group of game icons.

[0139] Exemplarily, when a local terminal device or a server displays an object to be swung in a graphical user interface and executes the object swing control method provided in an embodiment of the present application, it can be implemented through the particle system of the Unity engine, for example: multiple beads and pendants on the chain are set as particle objects in the particle system, and the chain is connected through AddOnePointToChain(), the pendant is connected to the chain through the Target_ParticlesAdd() method, and the multiple beads and pendants on the chain are drawn through the DrawBall() method to generate the object to be swung.

[0140] The object swing control method provided by the embodiment of the present application is described in detail below in combination with multiple embodiments.

[0141] Figure 3 A schematic diagram of a flow chart of an object swing control method provided in an embodiment of the present application, referring to Figure 3 As shown, the execution subject of the method can be any electronic device with processing capabilities, such as the above-mentioned local terminal device or server, and the method includes:

[0142] S301, obtaining current position information of each sub-object in the object to be swung.

[0143] It can be understood that during the swinging process of the object to be swung, in order to make the object to be swung present a swinging effect, the position of each sub-object in the object to be swung is refreshed once every frame, and the position of each sub-object in the next frame is obtained based on the position of each sub-object in the current frame. Therefore, the current position information of each sub-object in the object to be swung in each frame can be obtained, so that based on the current position information of each sub-object in each frame, the current position information of each sub-object in the next frame can be determined.

[0144] Optionally, when the object to be swung is in an initial position, that is, when the object to be swung is hit for the first time, obtaining the current position information of each sub-object in the object to be swung may be obtaining the position information of each sub-object in the object to be swung when it is stationary.

[0145] For example, continue to refer to Figure 1 As shown, when the object to be swung is hit for the first time, the local terminal device or the server obtains the current position information of each sub-object in the object to be swung, which can be the position information of each sub-object in the object to be swung when it is stationary.

[0146] Optionally, when the object to be swung is in the swinging process, that is, when the object to be swung is not hit for the first time, obtaining the current position information of each sub-object in the object to be swung may be obtaining the position information of each sub-object in the object to be swung in the current frame.

[0147] For example, continue to refer to Figure 2 As shown, when the object to be swung is not hit for the first time, the local terminal device or the server obtains the current position information of each sub-object in the object to be swung, which can be the position information of each sub-object in the object to be swung in the current frame.

[0148] The sub-objects in the object to be swung are arranged in a preset order, and the current position information is used to indicate the position of the sub-object in the current frame. The sub-object is the above-mentioned bead or pendant, and the position information of the sub-object can be the position coordinates of the center of the sub-object in the asset swing interface.

[0149] Exemplarily, when the object swing control method provided in the embodiment of the present application is executed through the particle system of the Unity engine, the management of the first strike or the non-first strike can be achieved through the StartCoroutine() method and the StopCoroutine() method.

[0150] S302: Determine current swing constraint information of each sub-object according to the current position information and previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object.

[0151] It can be understood that each sub-object in the object to be swung needs to simulate real physical gravity during the swinging process, while avoiding collision with other sub-objects. After the local terminal device or the server obtains the current position information of each sub-object in the object to be swung, the current swing constraint information of each sub-object can be determined according to the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object. Among them, the current swing constraint information is used to indicate the maximum swing range that each sub-object can swing when moving from the current frame to the next frame, and may include: swing direction, swing distance, swing speed, swing acceleration, etc.

[0152] Optionally, when the object to be swung is hit for the first time, the current swing constraint information of each sub-object in the object to be swung may be generated by a local terminal device or a server using preset parameters.

[0153] Optionally, when the object to be swung is not hit for the first time, after the local terminal device or the server obtains the current position information of each sub-object in the object to be swung, it can calculate the current swing constraint information of each sub-object based on the current position information and previous position information of each sub-object, as well as the current position information of adjacent sub-objects of each sub-object.

[0154] Exemplarily, when the object to be swung is hit for the first time, the initial swing constraint information pre-stored in the local terminal or the server may be used as the current swing constraint information of each sub-object in the object to be swung.

[0155] Exemplarily, when the object to be swung is not hit for the first time, the impact force and gravity received by each sub-object during its swing can be analyzed based on the current position information and the previous position information of each sub-object, as well as the current position information of each sub-object's adjacent sub-objects, so as to construct a swing constraint equation for each sub-object, and solve the swing constraint equation to obtain the current swing constraint information of each sub-object.

[0156] The previous position information is used to indicate the position of the sub-object in the previous frame of the current frame. The adjacent sub-objects of each sub-object can be the previous sub-object or the next sub-object. For example, the adjacent sub-objects of a certain bead can be the two beads adjacent to the bead, the adjacent sub-objects of the last bead can be the beads adjacent to the bead and the pendant, and the adjacent sub-objects of the first bead can be the bead itself and the beads adjacent to the bead.

[0157] Exemplarily, when the object swing control method provided in the embodiment of the present application is executed through the particle system of the Unity engine, the current swing constraint information of each sub-object can be set as the constraint object of each particle object to implement the constraint on each particle object.

[0158] S303: Determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object.

[0159] Optionally, after determining the current swing constraint information of each sub-object, the current swing constraint information of each sub-object can be applied to the current position information of each sub-object, thereby obtaining the next position information of each sub-object, wherein the next position information is used to indicate the position of the sub-object in the next frame of the current frame.

[0160] Exemplarily, the current position information of each sub-object can be used as the starting point, and the swing direction, swing distance, swing speed and swing acceleration in the current swing constraint information can be used as motion conditions to calculate the next position information of each sub-object from the current frame to the next frame.

[0161] S304 , rendering and displaying the object to be swung in a frame next to the current frame according to the next position information of each sub-object.

[0162] Optionally, after determining the next position information of each sub-object, the local terminal device or the server renders and displays each sub-object of the object to be swung in the graphical user interface in the next frame of the current frame to achieve rendering and display of the object to be swung.

[0163] Exemplarily, when the object swing control method provided in the embodiment of the present application is executed through the particle system of the Unity engine, the rendering display of the swinging object can be realized through the Rendering() method.

[0164] In this embodiment, by acquiring the current position information of each sub-object in the object to be swung, and determining the current swing constraint information of each sub-object based on the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object, the next position information of each sub-object can be determined based on the current position information and the current swing constraint information of each sub-object, so that the object to be swung can be rendered and displayed in the next frame of the current frame based on the next position information of each sub-object, so that when the object to be swung is swung, it can swing in the next frame based on the current frame, thereby ensuring the continuity of the object to be swung during the swinging process, and by determining the next position information of each sub-object based on the current swing constraint information, the object to be swung can better simulate the real physical gravity during the swinging process, thereby enhancing the realism of the object to be swung during the swinging process during the game, and improving the player's gaming experience.

[0165] At the same time, since the present application only needs to calculate the current swing constraint information and the next position information before the next frame swings, the present application also has the advantages of simple calculation, does not require a large memory space, and has low performance consumption. In addition, since the present application only needs to obtain the current position information to perform swing control, the present application has high reusability and can be extended to any scenario where the object to be swung needs to be swung, without being limited by the shape and size of the object to be swung.

[0166] As a possible implementation, the process of determining the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object is exemplarily described. The above S302 includes:

[0167] Based on the current position information and previous position information of the first sub-object, the first constraint information of the first sub-object is determined, where the first sub-object is any sub-object in the object to be swung; and / or, based on the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, the second constraint information of the first sub-object is determined.

[0168] It can be understood that each sub-object in the object to be swung needs to meet the following conditions during the swinging process: first, it needs to simulate the real physical gravity, and second, it needs to avoid collision with other sub-objects. Since each sub-object swings in the next frame based on the current frame, it means that the current swing constraint information can be determined based on the expectation of each sub-object swinging in the next frame.

[0169] That is to say, if each sub-object needs to give priority to simulating the real physical gravity when swinging in the next frame, then when determining the current swing constraint information, the first constraint information of each sub-object can be determined based on the current position information and the previous position information of each sub-object, that is, the first constraint information is used to indicate that each sub-object should give priority to swinging in a manner that simulates the real physical conditions, and the first constraint information is used as the current swing constraint information.

[0170] If each sub-object needs to give priority to avoiding collision with other sub-objects when swinging in the next frame, then when determining the current swing constraint information, the second constraint information of the first sub-object can be determined based on the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, that is, the second constraint information is used to indicate that each sub-object should swing in a manner that gives priority to avoiding collision with other sub-objects, and the second constraint information is used as the current swing constraint information.

[0171] In addition, if each sub-object needs to comprehensively consider the conditions for simulating real physical gravity and avoiding collision with other sub-objects when swinging in the next frame, then when determining the current swing constraint information, the first constraint information of the first sub-object can be determined based on the current position information and the previous position information of the first sub-object, and the second constraint information of the first sub-object can be determined based on the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, and the first constraint information and the second constraint information are used as the current swing constraint information.

[0172] Optionally, the first constraint information of the first sub-object may be calculated based on the current position information and the previous position information of the first sub-object, wherein the first constraint information is used to indicate the maximum swing range of each sub-object when moving from the current frame to the next frame in a manner that gives priority to simulating real physical conditions, including: swing direction, swing distance, swing speed, swing acceleration, etc.

[0173] Optionally, the second constraint information of the first sub-object may be calculated based on the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object. The second constraint information is used to indicate the maximum swing range that each sub-object can swing when moving from the current frame to the next frame in a manner that gives priority to avoiding collision with other sub-objects, including: swing direction, swing distance, swing speed, swing acceleration, etc.

[0174] The first constraint information of the first sub-object is determined by the current position information and the previous position information of the first sub-object, where the first sub-object is any sub-object in the object to be swung; and / or the second constraint information of the first sub-object is determined by the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object. The current swing constraint information can be determined in different situations according to the expectation of each sub-object when swinging in the next frame, which not only enables the object to be swung to better simulate the real physical gravity during the swinging process, but also avoids collisions between the sub-objects in the object to be swung during the swinging process, thereby further enhancing the realism of the object to be swung during the swinging process during the game and improving the player's gaming experience.

[0175] Figure 4 A schematic diagram of determining first constraint information of a first sub-object in the object swing control method provided in an embodiment of the present application.

[0176] As a possible implementation, refer to Figure 4 As shown, taking any sub-object as the first sub-object, the process of determining the first constraint information of the first sub-object is exemplarily described.

[0177] Optionally, the current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate.

[0178] For example, continue to refer to Figure 4 As shown, the current position information of the first sub-object includes the first position coordinates (x1, y1) of the first sub-object in the current frame, and the previous position information of the first sub-object includes the second position coordinates (x2, y2) of the first sub-object in the previous frame.

[0179] As a possible implementation manner, the above step of determining the first constraint information of the first sub-object according to the current position information and the previous position information of the first sub-object includes:

[0180] The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

[0181] Optionally, continue to refer to Figure 4 As shown, the first position coordinate (x1, y1) and the second position coordinate (x2, y2) can be subtracted to obtain the first vector And the first vector As the first constraint information. Among them, the first vector It is used to represent the moving direction and moving distance of the first position coordinate (x1, y1) relative to the second position coordinate (x2, y2). At the same time, when the frame rate of the current frame and the next frame is fixed, the first vector The swing speed and the swing acceleration of the first position coordinate (x1, y1) relative to the second position coordinate (x2, y2) can also be characterized.

[0182] By subtracting the first position coordinate from the second position coordinate to obtain the first vector, and using the first vector as the first constraint information, it is helpful to clarify the direction and distance of each sub-object when swinging, ensure the continuity of the object to be swung during the swinging process, enhance the realism of the object to be swung during the swinging process during the game, improve the player's gaming experience, and at the same time, it can reduce the computational complexity when determining the first constraint information, improve the calculation speed, do not need to occupy a large memory space, and have low performance consumption.

[0183] Figure 5 A schematic diagram of determining second constraint information of a first sub-object in the object swing control method provided in an embodiment of the present application.

[0184] As a possible implementation, refer to Figure 5 As shown, taking any sub-object as the first sub-object, the process of determining the second constraint information of the first sub-object is exemplarily described.

[0185] Optionally, the current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; and the current position information of the second sub-object includes: a third position coordinate.

[0186] For example, continue to refer to Figure 5As shown, the current position information of the first sub-object includes the first position coordinates (x1, y1) of the first sub-object in the current frame. Taking the second sub-object as the previous sub-object of the first sub-object as an example, the current position information of the second sub-object includes the third position coordinates (x3, y3) of the second sub-object in the current frame.

[0187] As a possible implementation manner, the above step determines the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, including:

[0188] The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information. The second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

[0189] Optionally, continue to refer to Figure 5 As shown, the first position coordinate (x1, y1) is subtracted from the third position coordinate (x3, y3) to obtain the second vector And the second vector As the second constraint information. Among them, the second vector It is used to represent the difference in position coordinates of the first sub-object relative to the second sub-object in the current frame, including direction difference and distance difference.

[0190] The second vector is obtained by subtracting the first position coordinate from the third position coordinate. Using the second vector as the second constraint information helps to clarify the relative direction and relative distance between each sub-object when the sub-object is swinging, avoids collision between the sub-objects of the object to be swung during the swinging process, improves the player's gaming experience, and at the same time, can reduce the computational complexity when determining the second constraint information, improve the calculation speed, do not need to occupy a large memory space, and have low performance consumption.

[0191] Figure 6 Another schematic diagram of determining the second constraint information of the first sub-object in the object swing control method provided in an embodiment of the present application.

[0192] As a possible implementation, refer to Figure 6 As shown, taking any sub-object as the first sub-object, the process of determining the second constraint information of the first sub-object is exemplarily described.

[0193] Optionally, the current position information includes: a first position coordinate; the second sub-object includes the previous sub-object of the first sub-object and the next sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the next sub-object includes: a fourth position coordinate.

[0194] For example, continue to refer to Figure 6 As shown, the current position information of the first sub-object includes the first position coordinates (x1, y1) of the first sub-object in the current frame, the current position information of the previous sub-object of the first sub-object includes the third position coordinates (x3, y3) of the previous sub-object of the first sub-object, and the current position information of the next sub-object of the first sub-object includes the fourth position coordinates (x4, y4) of the next sub-object of the first sub-object.

[0195] Optionally, the above step of determining the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object includes:

[0196] The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

[0197] Optionally, continue to refer to Figure 6 As shown, the first position coordinate (x1, y1) is subtracted from the third position coordinate (x3, y3) to obtain the third vector And subtract the fourth position coordinate (x4, y4) from the first position coordinate (x1, y1) to get the fourth vector And calculate the third vector and the fourth vector The average vector The average vector As the second constraint information. Among them, the average vector It is used to represent the average position difference of the position coordinates of the first sub-object relative to the previous sub-object and the next sub-object in the current frame, including the direction difference and the distance difference.

[0198] The third vector is obtained by subtracting the first position coordinate from the third position coordinate, and the fourth vector is obtained by subtracting the fourth position coordinate from the first position coordinate, and the average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information. This helps to clarify the relative direction and relative distance between each sub-object and the front and rear sub-objects when swinging, avoids collisions between the sub-objects of the object to be swung during the swinging process, improves the player's gaming experience, and at the same time, can reduce the computational complexity when determining the second constraint information, improve the calculation speed, does not require a large memory space, and has low performance consumption.

[0199] The above is an exemplary description of the process of determining the first constraint information and the second constraint information in the current swing constraint information. It can be understood that depending on the difference in the first constraint information and / or the second constraint information included in the current swing constraint information, the process of determining the next position information of each sub-object will also change accordingly according to the current position information and the current swing constraint information of each sub-object. An exemplary description is given below.

[0200] As a possible implementation, continue to refer to Figure 4 As shown, taking any sub-object as the first sub-object, the above S302 determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, including:

[0201] The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0202] Optionally, when each sub-object is swung in a manner that simulates real physical conditions, after determining the first constraint information, the first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object, wherein the next position information of the first sub-object is used to indicate the position coordinates of the first sub-object in the next frame of the current frame.

[0203] For example, the first vector Superimpose it on the first position coordinate (x1, y1) to obtain the next position information of the first sub-object.

[0204] For example, the first vector The preset attenuation coefficient is multiplied and the result is superimposed on the first position coordinate (x1, y1) to obtain the next position information of the first sub-object. The preset attenuation coefficient can be determined by force analysis of gravity, traction and friction on the first sub-object.

[0205] By superimposing the first constraint information onto the current position information of the first sub-object, the next position information of the first sub-object is obtained, thereby ensuring the accuracy of the next position information of the first sub-object and ensuring the continuity of the first sub-object during the swinging process, thereby enhancing the realism of the object to be swung during the swinging process during the game and improving the gaming experience of the player. At the same time, the computational complexity of determining the next position information of the first sub-object can be reduced, the computational speed can be improved, a large memory space does not need to be occupied, and the performance consumption is relatively small.

[0206] As a possible implementation, continue to refer to Figure 5 or Figure 6As shown, taking any sub-object as the first sub-object, the above S302 determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, including:

[0207] The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0208] Optionally, when each sub-object is swung in a manner that avoids collision, after determining the second constraint information, the second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object. The next position information of the first sub-object is used to indicate the position coordinates of the first sub-object in the next frame of the current frame.

[0209] For example, the second vector Superimpose it on the first position coordinate (x1, y1) to obtain the next position information of the first sub-object.

[0210] For example, the second vector The preset attenuation coefficient is multiplied and the result is superimposed on the first position coordinate (x1, y1) to obtain the next position information of the first sub-object. The preset attenuation coefficient can be determined by force analysis of gravity, traction and friction on the first sub-object.

[0211] By superimposing the second constraint information onto the current position information of the first sub-object, the next position information of the first sub-object is obtained, thereby ensuring the accuracy of the next position information of the first sub-object, and avoiding collisions between the sub-objects of the object to be swung during the swinging process, thereby improving the player's gaming experience. At the same time, the computational complexity of determining the next position information of the first sub-object can be reduced, the calculation speed can be improved, a large memory space does not need to be occupied, and the performance consumption is relatively small.

[0212] It can be understood that when the current swing constraint information includes the first constraint information and the second constraint information, that is, when each sub-object swings in the next frame, the conditions of simulating the real physical gravity and avoiding collision with other sub-objects are taken into consideration at the same time, the next position information of each sub-object can also be determined based on the first constraint information and the second constraint information. An exemplary explanation is given below.

[0213] Figure 7 A schematic diagram of a flow chart for determining the next position information of each sub-object in the object swing control method provided in an embodiment of the present application.

[0214] As a possible implementation, refer to Figure 7As shown, in the above S302, when determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, the following steps may be performed, specifically including:

[0215] S701: Superimpose first constraint information onto current position information of a first sub-object to obtain next candidate position information of the first sub-object.

[0216] For example, the first vector Superimpose it on the first position coordinate (x1, y1) to obtain the next candidate position information of the first sub-object.

[0217] S702: Obtain the next candidate position information of the second sub-object.

[0218] Optionally, the next candidate position information of the second sub-object adjacent to the first sub-object is obtained, wherein the next candidate position information of the second sub-object can be calculated by using the current swing constraint information of the second sub-object and the current position information of the second sub-object.

[0219] S703: Determine third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object.

[0220] Optionally, after obtaining the next candidate position information of the first sub-object and the next candidate position information of the second sub-object, it is possible to determine the positions to which the first sub-object and the second sub-object may move in the next frame of the current frame. Then, based on the next candidate position information of the first sub-object and the next candidate position information of the second sub-object, the second constraint information of the first sub-object and the second sub-object in the next frame, that is, the third constraint information, can be determined.

[0221] The third constraint information is used to represent the position difference between the first sub-object and the second sub-object in the next frame of the current frame, including the direction difference and the distance difference.

[0222] S704: Determine the next position information of the first sub-object according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

[0223] Optionally, after obtaining the third constraint information, the third constraint information may be compared with the second constraint information, and based on the comparison result, it is determined whether to adjust the next candidate position information of the first sub-object, thereby obtaining the next position information of the first sub-object.

[0224] By superimposing the first constraint information onto the current position information of the first sub-object, the next position information of the first sub-object is obtained, and the next position information of the second sub-object is obtained, and the third constraint information of the first sub-object is determined according to the next position information of the first sub-object and the next position information of the second sub-object, so as to determine the next position information of the first sub-object according to the third constraint information, the second constraint information and the next position information of the first sub-object, when each sub-object swings in the next frame, the conditions for simulating the real physical gravity and avoiding collision with other sub-objects can be comprehensively considered, which can not only make the object to be swung simulate the real physical gravity more during the swinging process, but also avoid collision between each sub-object in the object to be swung during the swinging process, further enhance the sense of reality of the object to be swung during the swinging process in the game process, and improve the game experience of the player. At the same time, it can also reduce the computational complexity when determining the next position information of the first sub-object, improve the computational speed, do not need to occupy a large memory space, and have low performance consumption.

[0225] As a possible implementation manner, the next candidate position information of the first sub-object includes: the fifth position coordinates; the next candidate position information of the second sub-object includes: the sixth position coordinates.

[0226] Exemplarily, the next position information to be selected of the first sub-object includes: the fifth position coordinate (x5, y5), and the next position information to be selected of the second sub-object includes: the sixth position coordinate (x6, y6).

[0227] As a possible implementation manner, in the above S703, the third constraint information of the first sub-object is determined according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object, including:

[0228] Subtract the sixth position coordinate from the fifth position coordinate to obtain the fifth vector The fifth vector As the third constraint information.

[0229] Optionally, the sixth position coordinate (x6, y6) is subtracted from the fifth position coordinate (x5, y5) to obtain a fifth vector The fifth vector As the third constraint information. Among them, the fifth vector It is used to represent the position difference between the next candidate position information of the first sub-object and the next candidate position information of the second sub-object in the next frame of the current frame, including the direction difference and the distance difference.

[0230] The fifth vector is obtained by subtracting the sixth position coordinate from the fifth position coordinate. Using the fifth vector as the third constraint information helps to clarify the relative direction and relative distance between each sub-object when each sub-object is swinging at the next selected position, thereby avoiding collisions between the sub-objects of the object to be swung during the swinging process, thereby improving the player's gaming experience. At the same time, it can reduce the computational complexity when determining the third constraint information, improve the calculation speed, do not require a large memory space, and have low performance consumption.

[0231] As a possible implementation manner, the step of determining the next position information of the first sub-object according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object in S704 includes:

[0232] If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated to obtain the incremental constraint information, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

[0233] Optionally, the third constraint information and the second constraint information are judged. If the third constraint information is different from the second constraint information, it can be determined that there is an error between the next candidate position information of the first sub-object and the optimal position that satisfies the conditions of simulating real physical gravity and avoiding collision with other sub-objects. Then, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated, and the incremental constraint information is superimposed on the next candidate position information of the first sub-object to obtain the next position information of the first sub-object.

[0234] Exemplarily, the fifth vector is calculated With the second vector The difference between And the difference vector Divide by 2 to get the incremental constraint information, that is, the incremental vector And the incremental constraint information The next position information of the first sub-object is superimposed on the next position information to be selected, so as to obtain the next position information of the first sub-object.

[0235] Exemplarily, the fifth vector is calculated With the second vector The difference between And the difference vector As incremental constraint information, and the incremental constraint information The information is multiplied by a preset attenuation coefficient and superimposed on the next candidate position information of the first sub-object to obtain the next position information of the first sub-object.

[0236] By judging the third constraint information and the second constraint information, if the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object, which can ensure the accuracy of the next position information of the first sub-object and the continuity of the first sub-object during the swinging process, thereby enhancing the realism of the object to be swung during the swinging process in the game, improving the player's gaming experience, and at the same time, the calculation is simple.

[0237] As a possible implementation manner, the above S704 determines the next position information of the first sub-object according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object, including:

[0238] If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0239] Optionally, the third constraint information and the second constraint information are judged. If the third constraint information is the same as the second constraint information, it can be determined that the next candidate position information of the first sub-object is the optimal position that meets the conditions of simulating real physical gravity and avoiding collision with other sub-objects. Then, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0240] By judging the third constraint information and the second constraint information, if the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object, which can ensure the accuracy of the next position information of the first sub-object and simplify the calculation.

[0241] The above is an exemplary description of the process of determining the next position information of each sub-object based on the current position information and current swing constraint information of each sub-object. It can be understood that after determining the next position information of each sub-object, the rendering parameters of each sub-object in the next frame can also be determined to improve the rendering effect. The following is an exemplary description.

[0242] As a possible implementation manner, after determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object in S302, the method further includes:

[0243] The rendering parameters of each sub-object in the next frame are determined according to the current position information and the next position information of each sub-object.

[0244] Optionally, after the next position information of each sub-object is determined, the rendering parameters of each sub-object in the next frame can be calculated according to the current position information and the next position information of each sub-object.

[0245] The rendering parameters include: moving speed and / or rotation angle. The moving speed refers to the display speed of the sub-object moving from the current frame to the next frame, and the rotation angle refers to the rotation angle of the sub-object from the current frame to the next frame.

[0246] By determining the rendering parameters of each sub-object in the next frame through the current position information and the next position information of each sub-object, the authenticity of the swinging object in the graphical user interface can be improved, and the player's gaming experience can be avoided from being affected by discontinuous motion trajectory or abrupt speed changes or angle changes, thereby improving the player's gaming experience.

[0247] Figure 8 A schematic diagram of a flow chart for determining rendering parameters of each sub-object in the next frame in the object swing control method provided in an embodiment of the present application.

[0248] As a possible implementation, refer to Figure 8 As shown, taking any sub-object as the first sub-object, the above steps determine the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object, and can be performed according to the following steps, specifically including:

[0249] S801. Determine moving length information of the first sub-object in the next frame according to next position information of the first sub-object and current position information of the first sub-object.

[0250] Optionally, the absolute value of the difference between the next position information of the first sub-object and the current position information of the first sub-object is calculated to obtain the moving length information of the first sub-object in the next frame.

[0251] S802: Determine the moving speed of the first sub-object in the next frame according to the moving length information and the preset refresh time.

[0252] Optionally, the moving length information is divided by a preset refresh time to obtain the moving speed of the first sub-object in the next frame. The preset refresh time is the refresh time from the current frame to the next frame, which can be 0.02s by way of example.

[0253] By determining the moving length information of the first sub-object in the next frame through the next position information of the first sub-object and the current position information of the first sub-object, and by determining the moving speed of the first sub-object in the next frame according to the moving length information and the preset refresh time, a smoother and more natural motion effect can be generated, which helps to enhance the realism and viewing experience of the object to be swung during the swinging process. At the same time, since the moving speed is calculated based on the next position information, the interactivity and real-time nature of the game can also be improved.

[0254] Fig. 9 Another flowchart diagram of determining rendering parameters of each sub-object in the next frame in the object swing control method provided in an embodiment of the present application.

[0255] As a possible implementation, refer to Fig. 9 As shown, taking any sub-object as the first sub-object, the above steps determine the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object, and can be performed according to the following steps, including:

[0256] S901. Determine moving length information of the first sub-object in the next frame according to next position information of the first sub-object and current position information of the first sub-object.

[0257] Optionally, the absolute value of the difference between the next position information of the first sub-object and the current position information of the first sub-object is calculated to obtain the moving length information of the first sub-object in the next frame.

[0258] S902: Calculate the rotation angle of the first sub-object in the next frame according to the moving length information.

[0259] Optionally, the moving length information is substituted into a preset trigonometric function, and the obtained result is used as the rotation angle of the first sub-object in the next frame.

[0260] Exemplarily, the tangent value of the moving length information is calculated, and the obtained result is used as the rotation angle of the first sub-object in the next frame.

[0261] By using the next position information of the first sub-object and the current position information of the first sub-object, the moving length information of the first sub-object in the next frame is determined, and based on the moving length information, the rotation angle of the first sub-object in the next frame is calculated. This can ensure that the swinging effect of each sub-object is smoother and more natural when switching between the current frame and the next frame, reducing jumping or abrupt phenomena, and helping to improve the realism and viewing experience of the object to be swung during the swinging process.

[0262] As a possible implementation, in the above S304, rendering and displaying the object to be swung in the next frame of the current frame according to the next position information of each sub-object includes:

[0263] The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0264] Optionally, after the current frame is rendered and displayed, the local terminal device or the server renders and displays the object to be swung in the next frame of the current frame in the graphical user interface according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0265] Exemplarily, after the current frame is rendered and displayed, the local terminal device or server can first read and render the next position information of the pendant in the object to be swung and the rendering parameters of the pendant in the next frame, and then traverse the multiple beads in the chain from the tail of the chain to the head of the chain, and read and render the next position information of each bead and the rendering parameters in the next frame, so as to present the swing of the object to be swung in the next frame of the current frame.

[0266] Exemplarily, after the current frame is rendered and displayed, the local terminal device or server can first read and render the next position information of the last bead at the end of the chain in the swinging object and the rendering parameters in the next frame, and then read and render the next position information of the pendant in the swinging object and the rendering parameters of the pendant in the next frame, and at the same time, traverse the multiple beads in the chain from the end of the chain to the beginning of the chain, read and render the next position information of each bead and the rendering parameters in the next frame, so as to present the swing of the object to be swung in the next frame of the current frame. Among them, when rendering and displaying the pendant in the swinging object, the rendering parameters of the pendant in the next frame can be read and multiplied by the rendering parameters of the last bead at the end of the chain in the next frame to obtain the final rendering parameters of the pendant in the next frame, and the pendant is rendered and displayed with the final rendering parameters of the pendant in the next frame.

[0267] Exemplarily, when rendering and displaying a plurality of beads in a chain, only the moving speed of each bead in the next frame may be read and rendered and displayed.

[0268] It can be understood that the process of rendering and displaying the swinging object can be adjusted according to the application situation in the actual game, and this application does not elaborate on this.

[0269] The object to be swung is rendered and displayed in the frame next to the current frame through the next position information of each sub-object and the rendering parameters of each sub-object in the next frame, thereby ensuring the continuity and realism of the movement of each sub-object in the object to be swung, so that the object to be swung can be displayed smoothly and vividly on the graphical user interface according to the expected trajectory and effect, which can not only improve the quality of visual effects, but also enhance the immersion and satisfaction of user experience.

[0270] As a possible implementation, the step S301 of acquiring the current position information of each sub-object in the object to be swung includes:

[0271] According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is obtained in sequence.

[0272] For example, the current position information of each chain bead may be obtained in sequence from the end of the chain to the beginning of the chain, and then the current position information of the pendant may be obtained.

[0273] Obtaining the current position information of each sub-object in turn according to the position order of each sub-object in the object to be swung helps to avoid potential errors caused by random or uncertain access order, ensure the accuracy of the calculation process, and at the same time reduce the complexity and conditional branches in the calculation process and improve the calculation performance.

[0274] As a possible implementation manner, the object swing control method provided in the embodiment of the present application further includes:

[0275] If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in the next frame of the current frame, wherein the preset style is used to indicate that the object to be swung falls.

[0276] Optionally, during the refresh process of each frame, the number of pendants to be eliminated in the object to be swung will be updated accordingly. When the number of pendants to be eliminated is zero, it means that the target sub-object in the object to be swung in the current frame is in a preset state. Then, the object to be swung will be displayed in a preset style in the next frame of the current frame to prompt the player that the current game goal has been achieved.

[0277] Exemplarily, when the head of the chain is hung at the center position of the upper boundary line of the asset swing interface, the preset style may include: in the next frame, the head of the chain in the object to be swung is detached from the center position of the upper boundary point of the asset swing interface, and the object to be swung falls vertically, and when the pendant touches the lower boundary line of the asset swing interface, the object to be swung bounces multiple times and disappears in the asset swing interface. At the same time, the background pattern in the asset swing interface is refreshed.

[0278] When the target sub-object in the object to be swung in the current frame is in a preset state, by displaying the object to be swung in a preset style in the next frame of the current frame, the player can be visually prompted in a coherent manner that the current game goal has been achieved, which helps the player to better understand the motion trajectory and state changes of the object to be swung, enhances the realism of the object to be swung during the swinging process during the game, and improves the player's gaming experience.

[0279] Based on the same inventive concept, an object swing control device corresponding to the object swing control method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned object swing control method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0280] Fig.10 A schematic diagram of an object swing control device provided in an embodiment of the present application, referring to Fig.10 As shown, the device includes: an acquisition module 1001, a swing constraint determination module 1002, a position determination module 1003 and a rendering and display module 1004; wherein,

[0281] An acquisition module 1001 is used to acquire current position information of each sub-object in the object to be swung, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order, and the current position information is used to indicate the position of the sub-object in the current frame;

[0282] The swing constraint determination module 1002 is used to determine the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in the frame before the current frame;

[0283] A position determination module 1003 is used to determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, where the next position information is used to indicate the position of the sub-object in the next frame of the current frame;

[0284] The rendering and display module 1004 is used to render and display the object to be swung in the next frame of the current frame according to the next position information of each sub-object.

[0285] As a possible implementation, the swing constraint determination module 1002 is specifically configured to:

[0286] Determine first constraint information of the first sub-object according to current position information and previous position information of the first sub-object, where the first sub-object is any sub-object in the object to be swung; and / or,

[0287] The second constraint information of the first sub-object is determined according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object.

[0288] As a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate;

[0289] The swing constraint determination module 1002 is specifically used for:

[0290] The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

[0291] As a possible implementation, the current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; the current position information of the second sub-object includes: a third position coordinate;

[0292] The swing constraint determination module 1002 is specifically used for:

[0293] The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information. The second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

[0294] As a possible implementation, the current position information includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object and a subsequent sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the subsequent sub-object includes: a fourth position coordinate;

[0295] The swing constraint determination module 1002 is specifically used for:

[0296] The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

[0297] As a possible implementation, the location determination module 1003 is specifically configured to:

[0298] The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0299] As a possible implementation, the location determination module 1003 is specifically configured to:

[0300] The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0301] As a possible implementation, the location determination module 1003 is specifically configured to:

[0302] Superimposing the first constraint information onto the current position information of the first sub-object to obtain the next candidate position information of the first sub-object;

[0303] Get the next candidate position information of the second sub-object;

[0304] Determine third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object;

[0305] The next position information of the first sub-object is determined according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

[0306] As a possible implementation, the next position information to be selected of the first sub-object includes: the fifth position coordinates; the next position information to be selected of the second sub-object includes: the sixth position coordinates;

[0307] The location determination module 1003 is specifically used for:

[0308] The sixth position coordinate is subtracted from the fifth position coordinate to obtain a fifth vector, and the fifth vector is used as the third constraint information.

[0309] As a possible implementation, the location determination module 1003 is specifically configured to:

[0310] If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated to obtain the incremental constraint information, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

[0311] As a possible implementation, the location determination module 1003 is specifically configured to:

[0312] If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0313] As a possible implementation, after the position determination module 1003, the method further includes: a rendering parameter determination module, the rendering parameter determination module is used to:

[0314] According to the current position information and the next position information of each sub-object, the rendering parameters of each sub-object in the next frame are determined, and the rendering parameters include: moving speed and / or rotation angle.

[0315] As a possible implementation method, the rendering parameter determination module is specifically used to:

[0316] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0317] The moving speed of the first sub-object in the next frame is determined according to the moving length information and the preset refresh time.

[0318] As a possible implementation method, the rendering parameter determination module is specifically used to:

[0319] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0320] According to the moving length information, the rotation angle of the first sub-object in the next frame is calculated.

[0321] As a possible implementation, the rendering and display module 1004 is specifically used for:

[0322] The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0323] As a possible implementation, the acquisition module 1001 is specifically used for:

[0324] According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is obtained in sequence.

[0325] As a possible implementation, the device further includes: a swing stop module, the swing stop module being used to:

[0326] If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in the next frame of the current frame, wherein the preset style is used to indicate that the object to be swung falls.

[0327] The embodiment of the present application obtains the current position information of each sub-object in the object to be swung, and determines the current swing constraint information of each sub-object based on the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object. The next position information of each sub-object can be determined based on the current position information and the current swing constraint information of each sub-object, so that the object to be swung can be rendered and displayed in the frame next to the current frame based on the next position information of each sub-object, so that when the object to be swung is swung, it can swing in the next frame based on the current frame, thereby ensuring the continuity of the object to be swung during the swinging process. In addition, the next position information of each sub-object is determined through the current swing constraint information, so that the object to be swung can better simulate the real physical gravity during the swinging process, thereby enhancing the realism of the object to be swung during the swinging process during the game, and improving the player's gaming experience.

[0328] At the same time, since the present application only needs to calculate the current swing constraint information and the next position information before the next frame swings, the present application also has the advantages of simple calculation, does not require a large memory space, and has low performance consumption. In addition, since the present application only needs to obtain the current position information to perform swing control, the present application has high reusability and can be extended to any scenario where the object to be swung needs to be swung, without being limited by the shape and size of the object to be swung.

[0329] The present application embodiment also provides an electronic device 1100, such as Fig.11 As shown, Fig.11 The structural diagram of the electronic device provided in the embodiment of the present application includes: a processor 1101, a memory 1102, and optionally, a bus 1103. The memory 1102 stores machine-readable instructions executable by the processor 1101 (for example, Fig.10 The device acquires the execution instructions corresponding to the module 1001, the swing constraint determination module 1002, the position determination module 1003 and the rendering display module 1004, etc.), when the electronic device 1100 is running, the processor 1101 communicates with the memory 1102 through the bus 1103, and the machine-readable instructions are executed by the processor 1101 to perform the following processing:

[0330] Acquire current position information of each sub-object in the object to be swung, wherein the sub-objects in the object to be swung are arranged in sequence according to a preset order, and the current position information is used to indicate the position of the sub-object in the current frame;

[0331] Determine the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in the frame previous to the current frame;

[0332] Determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, where the next position information is used to indicate the position of the sub-object in the next frame of the current frame;

[0333] According to the next position information of each sub-object, the object to be swung is rendered and displayed in a frame next to the current frame.

[0334] In a possible implementation manner, when the processor 1101 determines the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object, it is specifically configured to:

[0335] Determine first constraint information of the first sub-object according to current position information and previous position information of the first sub-object, where the first sub-object is any sub-object in the object to be swung; and / or,

[0336] The second constraint information of the first sub-object is determined according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object.

[0337] In a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate;

[0338] In a possible implementation manner, when the processor 1101 determines the first constraint information of the first sub-object according to the current position information and the previous position information of the first sub-object, it is specifically configured to:

[0339] The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

[0340] In a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; the current position information of the second sub-object includes: a third position coordinate;

[0341] In a possible implementation manner, when the processor 1101 determines the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, it is specifically configured to:

[0342] The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information. The second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

[0343] In a possible implementation, the current position information includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object and a subsequent sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the subsequent sub-object includes: a fourth position coordinate;

[0344] In a possible implementation manner, when the processor 1101 determines the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, it is specifically configured to:

[0345] The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

[0346] In a possible implementation manner, when the processor 1101 determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, it is specifically configured to:

[0347] The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0348] In a possible implementation manner, when the processor 1101 determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, it is specifically configured to:

[0349] The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0350] In a possible implementation manner, when the processor 1101 determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, it is specifically configured to:

[0351] Superimposing the first constraint information onto the current position information of the first sub-object to obtain the next candidate position information of the first sub-object;

[0352] Get the next candidate position information of the second sub-object;

[0353] Determine third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object;

[0354] The next position information of the first sub-object is determined according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

[0355] In a possible implementation manner, the next candidate position information of the first sub-object includes: the fifth position coordinates; the next candidate position information of the second sub-object includes: the sixth position coordinates;

[0356] In a possible implementation manner, when the processor 1101 determines the third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object, it is specifically configured to:

[0357] The sixth position coordinate is subtracted from the fifth position coordinate to obtain a fifth vector, and the fifth vector is used as the third constraint information.

[0358] In a possible implementation manner, when the processor 1101 determines the next position information of the first sub-object according to the third constraint information, the second constraint information, and the next candidate position information of the first sub-object, it is specifically configured to:

[0359] If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated to obtain the incremental constraint information, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

[0360] In a possible implementation manner, when the processor 1101 determines the next position information of the first sub-object according to the third constraint information, the second constraint information, and the next candidate position information of the first sub-object, it is specifically configured to:

[0361] If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0362] In a possible implementation manner, after determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, the processor 1101 is further configured to:

[0363] According to the current position information and the next position information of each sub-object, the rendering parameters of each sub-object in the next frame are determined, and the rendering parameters include: moving speed and / or rotation angle.

[0364] In a possible implementation manner, when the processor 1101 determines the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object, it is specifically configured to:

[0365] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0366] The moving speed of the first sub-object in the next frame is determined according to the moving length information and the preset refresh time.

[0367] In a possible implementation manner, when the processor 1101 determines the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object, it is specifically configured to:

[0368] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0369] According to the moving length information, the rotation angle of the first sub-object in the next frame is calculated.

[0370] In a possible implementation manner, when the processor 1101 renders and displays the object to be swung in a frame next to the current frame according to the next position information of each sub-object, it is specifically configured to:

[0371] The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0372] In a possible implementation manner, when the processor 1101 obtains the current position information of each sub-object in the object to be swung, it is specifically configured to:

[0373] According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is obtained in sequence.

[0374] In a possible implementation manner, the processor 1101 is further configured to:

[0375] If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in the next frame of the current frame, wherein the preset style is used to indicate that the object to be swung falls.

[0376] Among them, the storage medium 1402 stores program code. When the program code is executed by the processor 1401, the processor 1401 executes various steps of the virtual object control method in the game according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0377] Processor 1401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0378] Storage medium 1402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Storage medium may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access storage medium (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only storage medium (Programmable Read Only Memory, PROM), read-only storage medium (Read Only Memory, ROM), electrically erasable programmable read-only storage medium (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic storage medium, disk, CD, etc. Memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The storage medium 1402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0379] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:

[0380] Acquire current position information of each sub-object in the object to be swung, wherein the sub-objects in the object to be swung are arranged in sequence according to a preset order, and the current position information is used to indicate the position of the sub-object in the current frame;

[0381] Determine the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, as well as the current position information of the adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in the frame previous to the current frame;

[0382] Determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, where the next position information is used to indicate the position of the sub-object in the next frame of the current frame;

[0383] According to the next position information of each sub-object, the object to be swung is rendered and displayed in a frame next to the current frame.

[0384] In a possible implementation manner, when the processor determines the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object, it is specifically used to:

[0385] Determine first constraint information of the first sub-object according to current position information and previous position information of the first sub-object, where the first sub-object is any sub-object in the object to be swung; and / or,

[0386] The second constraint information of the first sub-object is determined according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object.

[0387] In a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate;

[0388] In a possible implementation manner, when the processor determines the first constraint information of the first sub-object according to the current position information and the previous position information of the first sub-object, it is specifically configured to:

[0389] The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

[0390] In a possible implementation manner, the current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; the current position information of the second sub-object includes: a third position coordinate;

[0391] In a possible implementation manner, when the processor determines the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, it is specifically configured to:

[0392] The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information. The second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

[0393] In a possible implementation, the current position information includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object and a subsequent sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the subsequent sub-object includes: a fourth position coordinate;

[0394] In a possible implementation manner, when the processor determines the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object, it is specifically configured to:

[0395] The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

[0396] In a possible implementation manner, when the processor determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, it is specifically configured to:

[0397] The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0398] In a possible implementation manner, when the processor determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, it is specifically configured to:

[0399] The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

[0400] In a possible implementation manner, when the processor determines the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, it is specifically configured to:

[0401] Superimposing the first constraint information onto the current position information of the first sub-object to obtain the next candidate position information of the first sub-object;

[0402] Get the next candidate position information of the second sub-object;

[0403] Determine third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object;

[0404] The next position information of the first sub-object is determined according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

[0405] In a possible implementation manner, the next candidate position information of the first sub-object includes: the fifth position coordinates; the next candidate position information of the second sub-object includes: the sixth position coordinates;

[0406] In a possible implementation manner, when the processor determines the third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object, it is specifically configured to:

[0407] The sixth position coordinate is subtracted from the fifth position coordinate to obtain a fifth vector, and the fifth vector is used as the third constraint information.

[0408] In a possible implementation manner, when the processor determines the next position information of the first sub-object according to the third constraint information, the second constraint information, and the next candidate position information of the first sub-object, it is specifically configured to:

[0409] If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated to obtain the incremental constraint information, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

[0410] In a possible implementation manner, when the processor determines the next position information of the first sub-object according to the third constraint information, the second constraint information, and the next candidate position information of the first sub-object, it is specifically configured to:

[0411] If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

[0412] In a possible implementation manner, after determining the next position information of each sub-object according to the current position information of each sub-object and the current swing constraint information, the processor is further configured to:

[0413] According to the current position information and the next position information of each sub-object, the rendering parameters of each sub-object in the next frame are determined, and the rendering parameters include: moving speed and / or rotation angle.

[0414] In a possible implementation manner, when the processor determines the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object, it is specifically configured to:

[0415] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0416] The moving speed of the first sub-object in the next frame is determined according to the moving length information and the preset refresh time.

[0417] In a possible implementation manner, when the processor determines the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object, it is specifically configured to:

[0418] Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object;

[0419] According to the moving length information, the rotation angle of the first sub-object in the next frame is calculated.

[0420] In a possible implementation manner, when rendering and displaying the object to be swung in a frame next to the current frame according to the next position information of each sub-object, the processor is specifically configured to:

[0421] The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

[0422] In a possible implementation manner, when the processor obtains the current position information of each sub-object in the object to be swung, it is specifically configured to:

[0423] According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is obtained in sequence.

[0424] In a possible implementation manner, the processor is further configured to:

[0425] If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in the next frame of the current frame, wherein the preset style is used to indicate that the object to be swung falls.

[0426] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.

[0427] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0428] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0429] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0430] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0431] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0432] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for controlling object swing, characterized in that: include: Acquire current position information of each sub-object in the object to be swung, wherein the sub-objects in the object to be swung are arranged in sequence according to a preset order, and the current position information is used to indicate the position of the sub-object in the current frame; Determine current swing constraint information of each sub-object according to current position information and previous position information of each sub-object, as well as current position information of adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in a frame previous to the current frame; Determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, wherein the next position information is used to indicate the position of the sub-object in the next frame of the current frame; According to the next position information of each sub-object, the object to be swung is rendered and displayed in a frame next to the current frame.

2. The object swing control method according to claim 1, characterized in that: The step of determining the current swing constraint information of each sub-object according to the current position information and the previous position information of each sub-object, and the current position information of the adjacent sub-objects of each sub-object, includes: Determine first constraint information of the first sub-object according to current position information and previous position information of the first sub-object, the first sub-object being any sub-object of the object to be swung; and / or, Second constraint information of the first sub-object is determined according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object.

3. The object swing control method according to claim 2, characterized in that: The current position information of the first sub-object includes: a first position coordinate, and the previous position information includes: a second position coordinate; The determining the first constraint information of the first sub-object according to the current position information and the previous position information of the first sub-object includes: The first position coordinate is subtracted from the second position coordinate to obtain a first vector, and the first vector is used as the first constraint information. The first vector is used to represent the moving direction and moving distance of the first position coordinate relative to the second position coordinate.

4. The object swing control method according to claim 2, characterized in that: The current position information of the first sub-object includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object or a subsequent sub-object of the first sub-object; the current position information of the second sub-object includes: a third position coordinate; The determining the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object includes: The first position coordinate is subtracted from the third position coordinate to obtain a second vector, and the second vector is used as the second constraint information, where the second vector is used to represent the position difference of the first sub-object relative to the second sub-object in the current frame.

5. The object swing control method according to claim 2, characterized in that: The current position information includes: a first position coordinate; the second sub-object includes a previous sub-object of the first sub-object and a subsequent sub-object of the first sub-object; the current position information of the previous sub-object includes: a third position coordinate; the current position information of the subsequent sub-object includes: a fourth position coordinate; The determining the second constraint information of the first sub-object according to the current position information of the first sub-object and the current position information of at least one second sub-object adjacent to the first sub-object includes: The first position coordinate is subtracted from the third position coordinate to obtain a third vector, and the fourth position coordinate is subtracted from the first position coordinate to obtain a fourth vector, and an average vector of the third vector and the fourth vector is calculated, and the average vector is used as the second constraint information.

6. The object swing control method according to claim 2, characterized in that: The step of determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object includes: The first constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

7. The object swing control method according to claim 2, characterized in that: The step of determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object includes: The second constraint information is superimposed on the current position information of the first sub-object to obtain the next position information of the first sub-object.

8. The object swing control method according to claim 2, characterized in that: The step of determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object includes: Superimposing the first constraint information onto the current position information of the first sub-object to obtain the next candidate position information of the first sub-object; Obtaining the next candidate position information of the second sub-object; Determining third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object; The next position information of the first sub-object is determined according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object.

9. The object swing control method according to claim 8, characterized in that: The next position information to be selected of the first sub-object includes: the fifth position coordinates; the next position information to be selected of the second sub-object includes: the sixth position coordinates; The determining the third constraint information of the first sub-object according to the next candidate position information of the first sub-object and the next candidate position information of the second sub-object includes: The sixth position coordinate is subtracted from the fifth position coordinate to obtain a fifth vector, and the fifth vector is used as the third constraint information.

10. The object swing control method according to claim 8, characterized in that: The determining the next position information of the first sub-object according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object includes: If the third constraint information is different from the second constraint information, the difference between the third constraint information and the second constraint information is calculated to obtain the difference constraint information, and based on the difference constraint information, the incremental constraint information is calculated, and the incremental constraint information is superimposed on the next selected position information of the first sub-object to obtain the next position information of the first sub-object.

11. The object swing control method according to claim 8, characterized in that: The determining the next position information of the first sub-object according to the third constraint information, the second constraint information and the next candidate position information of the first sub-object includes: If the third constraint information is the same as the second constraint information, the next candidate position information of the first sub-object is used as the next position information of the first sub-object.

12. The object swing control method according to claim 1, characterized in that: After determining the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, the method further includes: According to the current position information and the next position information of each sub-object, the rendering parameters of each sub-object in the next frame are determined, and the rendering parameters include: moving speed and / or rotation angle.

13. The object swing control method according to claim 12, characterized in that: The step of determining the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object includes: Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object; The moving speed of the first sub-object in the next frame is determined according to the moving length information and the preset refresh time.

14. The object swing control method according to claim 12, characterized in that: The step of determining the rendering parameters of each sub-object in the next frame according to the current position information and the next position information of each sub-object includes: Determine the moving length information of the first sub-object in the next frame according to the next position information of the first sub-object and the current position information of the first sub-object; The rotation angle of the first sub-object in the next frame is calculated according to the movement length information.

15. The object swing control method according to claim 12, characterized in that: The rendering and displaying of the object to be swung in a frame next to the current frame according to the next position information of each sub-object includes: The object to be swung is rendered and displayed in a frame next to the current frame according to the next position information of each sub-object and the rendering parameters of each sub-object in the next frame.

16. The object swing control method according to claim 1, characterized in that: The step of obtaining the current position information of each sub-object in the object to be swung includes: According to the position sequence of each sub-object in the object to be swung, the current position information of each sub-object is acquired in sequence.

17. The object swing control method according to claim 1, characterized in that: Also includes: If the target sub-object in the object to be swung in the current frame is in a preset state, the object to be swung is displayed in a preset style in a frame next to the current frame, wherein the preset style is used to indicate that the object to be swung falls.

18. An object swing control device, characterized in that: include: An acquisition module, used for acquiring current position information of each sub-object in the object to be swung, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order, and the current position information is used for indicating the position of the sub-object in the current frame; A swing constraint determination module, used to determine current swing constraint information of each sub-object according to current position information and previous position information of each sub-object, and current position information of adjacent sub-objects of each sub-object, wherein the previous position information is used to indicate the position of the sub-object in the frame previous to the current frame; A position determination module, used to determine the next position information of each sub-object according to the current position information and the current swing constraint information of each sub-object, wherein the next position information is used to indicate the position of the sub-object in the next frame of the current frame; The rendering and display module is used to render and display the object to be swung in a frame next to the current frame according to the next position information of each sub-object.

19. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the object swing control method as described in any one of claims 1 to 17.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the object swing control method as claimed in any one of claims 1 to 17 are executed.