Object swing control method and device, equipment and storage medium

By calculating the target position and angle information of each sub-object in the object to be swung, the problem of poor swing effect of long chains in the existing technology is solved, and a more realistic physical swing effect is achieved, and the player experience is improved.

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

Patent Information

Application Number
CN202411668674.9
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

The prior art shows better performance when achieving chain swings, shorter chains have better performance, but when there are many locking pieces and joints in the chain, the performance is poor, resulting in poor player experience.

Method used

By obtaining the current position information and angle information of each sub-object in the object to be swung, the displacement information of the first sub-object is determined, and the target position and angle information of each sub-object are calculated based on the displacement information and the information of other sub-objects, so that the object to be swung is displayed in the next frame.

Benefits of technology

Real physical swing of objects to be swung at any length is realized, which improves the player's gaming experience and reduces the computational complexity of game operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119587983A_ABST
    Figure CN119587983A_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 and current angle information of each sub-object in a to-be-swung object in a current frame; determining displacement information of a first sub-object in the object to be swung; determining target position information and target angle information of each sub-object in the object to be swung in a next frame of the current frame according to the displacement information of the first sub-object and the current position information and the current angle information of each sub-object; and according to the target position information and the target angle 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 to-be-swung object of any length can present real physical swing in the playing process of a player, the game experience of the player is improved, the immersion of the player in the game process is enhanced, and in addition, the calculation complexity is also reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of game object control, 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 are usually displayed on obstacles in the interface. During the game, the chains will swing or be eliminated according to the player's operations.

[0003] In the prior art, the swing of the chain can be achieved through a rigid body physics component.

[0004] However, this processing method can only be applied to the case where the chain is shorter. When the number of locking plates and joints in the chain is large, the presentation effect is poor, resulting in a poor player experience. Summary of the invention

[0005] The purpose of the present 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 problem that the prior art has poor presentation effect and poor player experience.

[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 and current angle information of each sub-object in the object to be swung in the current frame, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order;

[0009] Determine the displacement information of the first sub-object in the object to be swung;

[0010] Determine target position information and target angle information of each sub-object in the object to be swung in a frame next to the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object;

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

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

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

[0014] A first determining module, used to determine the displacement information of the first sub-object in the object to be swung;

[0015] A second determination module is used to determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object;

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

[0017] 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.

[0018] 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.

[0019] The beneficial effect of the present application is as follows: by obtaining the current position information and current angle information of each sub-object in the object to be swung in the current frame, and determining the displacement information of the first sub-object in the object to be swung, it is possible to determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, so that the object to be swung is rendered and displayed in the next frame of the current frame according to the target position information and the target angle information of each sub-object, so that the object to be swung of any length can present a real physical swing during the player's play, thereby improving the player's gaming experience, and at the same time, Since the displacement information of the first sub-object is determined first, and the target position information and target angle information of each sub-object are determined based on the displacement information of the first sub-object, when the object to be swung is swung, the swinging process of each sub-object more simulates the real physical swing, thereby enhancing the player's immersion in the game. In addition, since only the calculation of displacement and angle is involved, the present application can also reduce the computational complexity of electronic equipment operations during the game. Moreover, since the present application only needs to obtain the current position information and current angle information of each sub-object in the object to be swung in the current frame to achieve swing control, the present application has high reusability and can be extended to any scenario where an object needs to be swung. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] 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.

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

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

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

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

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

[0026] Figure 6A schematic diagram of an object swing control method provided in an embodiment of the present application;

[0027] Figure 7 A schematic diagram of an object to be swung provided in an embodiment of the present application when being struck;

[0028] Figure 8 A schematic diagram of a flow chart for determining target position information and target angle information of each sub-object in an object to be swung in a frame next to a current frame in the object sway control method provided in an embodiment of the present application;

[0029] Fig. 9 A schematic diagram of a flow chart for determining target position information and target angle information of the first sub-object in the object to be swung in the object swaying control method provided in an embodiment of the present application;

[0030] Fig.10 A schematic diagram of a flow chart for determining target position information of a first sub-object in the object swing control method provided in an embodiment of the present application;

[0031] Fig.11 A schematic diagram of a flow chart for determining target angle information of a first sub-object in the object swing control method provided in an embodiment of the present application;

[0032] Fig.12 A schematic diagram of a flow chart for determining target position information and target angle information of each sub-object except the first sub-object in the object swing control method provided in an embodiment of the present application;

[0033] Fig.13 A schematic diagram of a flow chart for determining target position information of a current sub-object in the object swing control method provided in an embodiment of the present application;

[0034] Fig.14 A schematic diagram of a flow chart for determining target angle information of a current sub-object in the object swing control method provided in an embodiment of the present application;

[0035] Fig.15 A schematic diagram of a flow chart for determining candidate angle information of a current sub-object in the object swing control method provided in an embodiment of the present application;

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

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

[0038] 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.

[0039] 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.

[0040] 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.

[0041] In interactive games, such as match-3 mobile games, game assets such as chains are usually displayed on obstacles in the interface. During the game, the chains will swing or be eliminated according to the player's operations.

[0042] In the prior art, the swing of the chain can be achieved through a rigid body physics component. Specifically, a rigid body 2D physics component and a HingeJoint2D rigid body component are mounted on the chain in the two-dimensional physics system (Physics2D) of the Unity engine, so that the chain generates physical properties.

[0043] However, this processing method can only be applied to the case of a short chain. When the number of lock plates and joints in the chain is large, the rendering effect is poor, which makes the player experience poor. At the same time, there is also the problem of high performance consumption.

[0044] Based on the above problems, the embodiment of the present application proposes an object swing control method, which obtains the current position information and current angle information of each sub-object in the object to be swung in the current frame, and determines the displacement information of the first sub-object in the object to be swung, so that the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame can be determined according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, so that the object to be swung is rendered and displayed in the next frame of the current frame according to the target position information and the target angle information of each sub-object. The object to be swung of any length can present a real physical swing. At the same time, because the displacement information of the first sub-object is determined first, and the target position information and target angle information of each sub-object are determined according to the displacement information of the first sub-object, the object to be swung can simulate the real physical swing when swinging, which improves the game experience of the player. In addition, it also has the advantages of simple calculation and high reusability, so that the object swing control method provided by the present application can be extended to any scene where the object needs to be swung.

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

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] 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.

[0051] Figure 1 A schematic diagram of a graphical user interface provided in an embodiment of the present application, referring to Figure 1 As shown, taking a level in a match-3 mobile game scene as an example, a task attribute interface and a to-be-eliminated interface may be displayed in the graphical user interface.

[0052] The task attribute interface displays the target elimination objects, the target number of target elimination objects, and the remaining steps information for passing the level. Specifically, the remaining steps information is used to indicate the remaining number of operations of the player in the level, that is, the player needs to eliminate the target number of target elimination objects within the remaining steps information to complete the level. The to-be-eliminated interface includes a first to-be-eliminated interface and a second to-be-eliminated interface. In the initial state, the first to-be-eliminated interface displays multiple game icons that can be dragged and eliminated, and the second to-be-eliminated interface displays multiple asset swing sub-interfaces, each of which is provided with a first to-be-swung object.

[0053] Continue to refer to Figure 1As shown, the player can eliminate the corresponding target first object to be swung and the target asset swing sub-interface where the target first object to be swung is located on the second interface to be eliminated by dragging the game icon in the first interface to be eliminated. After the target first object to be swung and the target asset swing sub-interface where the target first object to be swung are eliminated, the position where the target asset swing sub-interface is located is updated, and the target interface to be eliminated is displayed at the position where the target asset swing sub-interface is located. Figure 2 Another schematic diagram of a graphical user interface provided in an embodiment of the present application, referring to Figure 2 As shown, the target elimination interface includes multiple game icons that can be dragged and eliminated and multiple target elimination objects to be eliminated. Players can drag the game icons to eliminate the target number of target elimination objects, thereby completing the level.

[0054] For example, continue to refer to Figure 1 As shown, the first object to be swung may include a chain or a rope, and a pendant hanging at the bottom of the chain or the rope, and the pendant displays the number of objects to be eliminated related to the game icon, and the pattern of the pendant corresponds to the pattern of the game icon. The player needs to eliminate the 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 chain or rope where the pendant is located is broken, and at the same time, the asset swing sub-interface where the pendant is located is updated, so that multiple target elimination objects to be eliminated are displayed in the second interface to be eliminated, so that the player can pass the level.

[0055] Figure 3 Another schematic diagram of a graphical user interface provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, in Figure 1 or Figure 2 On the basis of the first to-be-eliminated interface and the target to-be-eliminated interface, multiple second to-be-swung objects can also be displayed. The second to-be-swung objects are chain objects covering the game icon that can be dragged and eliminated. Specifically, in the initial state, two second to-be-swung objects are cross-arranged on a game icon. Each second to-be-swung object is composed of multiple sub-objects connected in series in sequence, and the head and tail of each to-be-swung object are fixed on the cell where the game icon is located. Exemplarily, the second to-be-swung object can be a chain, and the sub-objects in the second to-be-swung object can be locking pieces.

[0056] Figure 3Taking the example of multiple second objects to be swung continuously arranged in a row of the first interface to be eliminated, it can be understood that the multiple second objects to be swung can be set separately on different game icons, or can be set continuously in a certain row or a certain column. During the game, the player can hit and eliminate each second object to be swung by dragging the game icon. When multiple second objects to be swung are continuously arranged in a certain row or a certain column, each second object to be swung is hit. The local terminal device or the server can control each second object to be swung to swing by executing the object swing control method provided in the embodiment of the present application, so that each second object to be swung can simulate the real physical swinging effect after being hit in the graphical user interface.

[0057] For example, continue to refer to Figure 3 As shown, the player can swap the positions of the "smiley face" game icon in the second row and sixth column with the "lightning" game icon in the second row and seventh column in the first interface to be eliminated by dragging. After the swap is completed, the "smiley face" game icons in the first row and seventh column, the second row and seventh column, and the third row and seventh column are eliminated as a group of game icons.

[0058] For example, Figure 4 Another schematic diagram of a graphical user interface provided in an embodiment of the present application, referring to Figure 4 As shown, in Figure 3 On the basis of this, after the group of "smiley face" game icons are eliminated, each second object to be swung in the fifth row is subjected to the impact effect from the seventh column, and the local terminal device or the server controls each second object to be swung in the fifth row to swing by executing the object swing control method provided in the embodiment of the present application, so that each second object to be swung can simulate the real physical swinging effect after being hit in the graphical user interface.

[0059] It can be understood that when the eliminated game icon is adjacent to the game icon where a second object to be swung is located, the second object to be swung can be broken after being hit, and the local terminal device or the server executes the object swing control method provided in the embodiment of the present application, and the remaining second object to be swung swings.

[0060] Optionally, when the player eliminates a target number of target elimination objects in the game, the player can enter the next level and the graphical user interface is updated accordingly.

[0061] 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 Unity engine, for example: multiple lock plates on the chain are set as particle objects in a particle system, thereby generating an object to be swung.

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

[0063] Figure 5 A flow chart of the object swing control method provided in the embodiment of the present application, referring to Figure 5 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:

[0064] S501, obtaining current position information and current angle information of each sub-object in the object to be swung in the current frame.

[0065] 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 of being hit, the position of each sub-object in the object to be swung is refreshed once every frame, and the position and angle of each sub-object when displayed in the next frame are obtained on the basis of the position and angle of each sub-object in the current frame. Therefore, the current position information and current angle information of each sub-object in the object to be swung in the current frame are first obtained, so that the target position information and target angle information of each sub-object in the next frame can be determined based on the current position information and current angle information of each sub-object in the current frame.

[0066] Among them, the sub-objects in the object to be swung are arranged in sequence according to a preset order, the object to be swung is the above-mentioned second object to be swung, the sub-object is the above-mentioned locking plate, the current position information of the sub-object in the current frame refers to the two-dimensional position coordinates or three-dimensional position coordinates of the center of the sub-object in the current frame, and the current angle information of the sub-object in the current frame refers to the angle of the center of the sub-object in the current frame relative to the two-dimensional coordinate axis or the three-dimensional coordinate axis in various directions.

[0067] S502: Determine the displacement information of the first sub-object in the object to be swung.

[0068] It can be understood that since each sub-object in the object to be swung needs to simulate real physical gravity during the swinging process, and the objects to be swung are arranged in sequence according to a preset order, the target position information and target angle information of the latter sub-object in the next frame depend on the target position information and target angle information of the previous sub-object in the next frame, and the target position information and target angle information of the first sub-object in the next frame depend on the current position information and current angle information of the first sub-object in the current frame. At the same time, it also depends on the impact effect received by the first sub-object when calculating the target position information and target angle information of the next frame, that is, the displacement information of the first sub-object.

[0069] Therefore, the displacement information of the first sub-object in the object to be swung may be determined first, wherein the displacement information of the first sub-object is used to indicate the magnitude of the position change of the first sub-object due to the force in the next frame.

[0070] Exemplarily, when determining the displacement information of the first sub-object, the impact effect suffered by the first sub-object when calculating the target position information and target angle information of the next frame can be superimposed on the current position information and current angle information of the first sub-object in the current frame to obtain the displacement information of the first sub-object.

[0071] S503 , determining target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object.

[0072] Optionally, after obtaining the displacement information of the first sub-object, that is, determining the force that the object to be swung is subjected to in the next frame, then, based on the displacement information of the first sub-object, the current position information of each sub-object, and the current angle information of each sub-object, the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame can be calculated respectively.

[0073] Exemplarily, based on the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, the target position information and the target angle information of the first sub-object in the next frame of the current frame can be calculated first, and then the target position information and the target angle information of each sub-object except the first sub-object in the next frame of the current frame can be calculated in sequence.

[0074] Exemplarily, the displacement information of each sub-object except the first sub-object can be calculated based on the displacement information of the first sub-object, and then the target position information and target angle information of each sub-object in the next frame of the current frame can be calculated based on the displacement information of each sub-object, the current position information of each sub-object, and the current angle information.

[0075] S504: Render and display the object to be swung in a frame next to the current frame according to the target position information and the target angle information of each sub-object.

[0076] Optionally, after determining the target position information and target angle information of each sub-object in the next frame of the current frame, 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 realize the rendering and display of the object to be swung.

[0077] In this embodiment, by obtaining the current position information and current angle information of each sub-object in the object to be swung in the current frame, and determining the displacement information of the first sub-object in the object to be swung, it is possible to determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, so that the object to be swung is rendered and displayed in the next frame of the current frame according to the target position information and the target angle information of each sub-object, so that the object to be swung of any length can present a real physical swing during the player's play, thereby improving the player's gaming experience. At the same time, due to First, the displacement information of the first sub-object is determined, and the target position information and target angle information of each sub-object are determined based on the displacement information of the first sub-object, so that when the object to be swung is swung, the swinging process of each sub-object more simulates the physical real swing, thereby enhancing the player's immersion in the game. In addition, since only the calculation of displacement and angle is involved, the present application can also reduce the computational complexity of electronic equipment calculations during the game. Moreover, since the present application only needs to obtain the current position information and current angle information of each sub-object in the object to be swung in the current frame to achieve swing control, the present application has high reusability and can be extended to any scenario where an object needs to be swung.

[0078] It is worth noting that when determining the displacement information of the first sub-object in the object to be swung, the displacement information of the first sub-object is affected by multiple factors and there are multiple situations. Taking the example of only one object to be swung being hit, the relevant concepts involved in determining the displacement information of the first sub-object are explained. When the number of objects to be swung that are hit increases, the effects of the hits on the objects to be swung can be superimposed, and this application will not go into details.

[0079] Figure 6 A schematic diagram of an object swing control method provided in an embodiment of the present application, referring to Figure 6 As shown, the current frame can be understood as time t0, and the next frame of the current frame can be understood as time t0+T, where T is the frame length. After the player drags the game icon in the current frame to play, the local terminal device or the server starts to execute the steps of the object swing control method provided in the embodiment of the present application at time t0, determines the target position information and target angle information of each sub-object, and renders and displays the object to be swung in the next frame of the current frame.

[0080] That is to say, from time t0 to time t0+T, the local terminal device or server calculates and renders the target position information and target angle information of each sub-object in the object to be swung based on all the strike effects generated during the player's play before time t0. Suppose the player drags the game icon to play at time t1, that is, the target position information and target angle information of each sub-object in the object to be swung in the next frame have begun to be calculated, but the object to be swung has been subjected to a new strike effect F1.

[0081] Then at this time, the new strike effect can be accumulated until the object to be swung determines the target position information and target angle information in the next frame in the next frame, that is, when the target position information and target angle information of each sub-object in the object to be swung in the next frame are determined at time t0+T, the strike effect F1 received at time t1 will be taken into consideration when determining the displacement information of the first sub-object in the object to be swung at time t0+t, that is, taking the current frame as time t0+t as an example, the displacement information generated by the strike effect F1 is called the displacement information of the strike that was not responded to in the previous frame.

[0082] Therefore, when determining the displacement information of the first sub-object in the object to be swung, it is necessary to consider the impact effect received by the object to be swung in the current frame and the impact effect received by the object to be swung in the frame before the current frame.

[0083] On this basis, taking the current frame as t0+T as an example, the impact effect of the swinging object will also be affected by the impact object. Figure 7 A schematic diagram of a swinging object provided in an embodiment of the present application when being struck, referring to Figure 7 As shown, taking the first chain corresponding to the first game icon in a row as an example, when the object to be swung is the first game icon, the hitting effect F2 received by the object to be swung is obviously different from the hitting effect F3 received by the object to be swung when the object to be swung is the third game icon, and the hitting effect F4 received by the object to be swung when the object to be swung is the sixth game icon.

[0084] In summary, when determining the displacement information of the first sub-object in the object to be swung, it is necessary to consider not only the impact effect on the object to be swung in the current frame, and the impact effect on the object to be swung in the frame before the current frame, but also the distance between the object to be swung and other objects to be swung. Therefore, the process of determining the displacement information of the first sub-object in the object to be swung in S502 is exemplarily described in different situations.

[0085] As a possible implementation, when it is necessary to comprehensively consider the impact effect on the object to be swung in the current frame, the impact effect on the object to be swung in the previous frame, and the distance between the object to be swung and other objects to be swung, the displacement information of the first sub-object in the object to be swung in S502 is determined, including:

[0086] The displacement information of the first sub-object is determined according to the associated displacement information and the preset displacement information.

[0087] Optionally, the local terminal device or server has a data structure for storing the striking effects of each object to be swung. During the game, the local terminal device or server updates the data structure by capturing the player's game data. When the local terminal device or server determines the displacement information of the first sub-object in the current frame, it can search and find the relevant information in the data structure to determine the influencing factors when determining the displacement information of the first sub-object in the current frame, that is, the associated displacement information and the preset displacement information.

[0088] Optionally, continue to refer to Figure 7 As shown, taking the first chain corresponding to the first game icon as an example, the preset displacement information can be understood as the displacement information corresponding to the impact effect F2 received by the object to be swung when the object to be swung is the first game icon, that is, the displacement information corresponding to the current object to be swung when the object to be swung is the first game icon.

[0089] Exemplarily, the preset displacement information of each object to be swung may be the same value, so as to present the real physical swinging effect of chains of the same mass when being hit by different forces. Exemplarily, the preset displacement information of each object to be swung may also be different values, so as to present the real physical swinging effect of chains of different masses when being hit by different forces.

[0090] Among them, the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was not responded to in the previous frame, and the distance between other objects that were hit and not responded in the previous frame and the object to be swung.

[0091] For example, continue to refer to Figure 7 As shown, taking the object to be swung as the first chain in the first game icon as an example, the distance between the other objects hit in the current frame and the object to be swung can be understood as the distance between the third game icon and the first game icon, or the distance between the third game icon and the first chain when the object hit is the third game icon.

[0092] For example, continue to refer to Figure 6 as well as Figure 7As shown, taking the current frame as t0+t and the object to be swung as the first chain in the first game icon as an example, the displacement information of the first sub-object that was not responded to in the previous frame can be understood as the displacement information corresponding to the impact effect F1 received by the first chain at t1 when the object being hit is the first game icon.

[0093] For example, continue to refer to Figure 6 as well as Figure 7 As shown, taking the current frame as t0+t and the object to be swung being the first chain corresponding to the first game icon as an example, the distance between the other objects that were hit and not responded to in the previous frame and the object to be swung can be understood as the distance between the third game icon and the first game icon, or the distance between the third game icon and the first chain when the third game icon is hit at t1.

[0094] By associating displacement information and preset displacement information to determine the displacement information of the first sub-object, the player's different situations during the game can be taken into consideration, including the impact effect received by the object to be swung in the current frame, the impact effect received by the object to be swung in the previous frame, and the distance between the object to be swung and other objects to be swung, to accurately determine the displacement information of the first sub-object, so that the swinging process of the object to be swung can respond to the player's interactive operations in real time, enriching the player's gaming experience.

[0095] As a possible implementation, when determining the displacement information of the first sub-object according to the associated displacement information and the preset displacement information, the following steps may be performed, specifically including:

[0096] According to the associated displacement information, the influence displacement information corresponding to the first child object is determined.

[0097] Optionally, the local terminal device or the server superimposes the obtained associated displacement information to generate impact displacement information corresponding to the first sub-object, wherein the impact displacement information is used to indicate an offset of the first sub-object relative to the preset displacement information.

[0098] For example, continue to refer to Figure 7 As shown, taking the case where the object to be swung is the first chain corresponding to the first game icon, and the object to be hit is the third game icon as an example, the first influencing displacement information corresponding to the distance between the other objects hit in the current frame and the object to be swung can be obtained by multiplying the attenuation coefficient corresponding to the distance between the other objects and the object to be swung by the preset displacement information.

[0099] For example, continue to refer to Figure 6 as well as Figure 7As shown, taking the current frame as t0+t and the object to be swung as the first chain corresponding to the first game icon as an example, the second impact displacement information corresponding to the displacement information of the first sub-object that was not responded to in the previous frame can be numerically the same as the preset displacement information.

[0100] For example, continue to refer to Figure 6 as well as Figure 7 As shown, taking the current frame as time t0+t and the object to be swung as the first chain corresponding to the first game icon as an example, the third influencing displacement information corresponding to the distance between other objects that were hit and not responded to in the previous frame and the object to be swung can be obtained by multiplying the attenuation coefficient corresponding to the distance between the other objects and the object to be swung by the preset displacement information.

[0101] Exemplarily, after obtaining the first influencing displacement information, the second influencing displacement information and the third influencing displacement information, the first influencing displacement information, the second influencing displacement information and the third influencing displacement information may be summed or multiplied to obtain the influencing displacement information corresponding to the first sub-object.

[0102] The sum of the affected displacement information and the preset displacement information will be used as the displacement information of the first child object.

[0103] Optionally, after the affected displacement information is obtained, the affected displacement information may be superimposed on the preset displacement information, and the sum of the affected displacement information and the preset displacement information is used as the displacement information of the first sub-object.

[0104] Optionally, after obtaining the sum of the affecting displacement information and the preset displacement information, the sum of the affecting displacement information and the preset displacement information can also be compared with a preset displacement information threshold. When the sum of the affecting displacement information and the preset displacement information is greater than the preset displacement information threshold, the preset displacement information threshold is used as the displacement information of the first sub-object.

[0105] As a possible implementation, when there is no preset displacement information, determining the displacement information of the first sub-object in the object to be swung in S502 includes:

[0106] Determine the displacement information of the first child object according to the associated displacement information.

[0107] Optionally, the local terminal device or server has a data structure for storing the striking effects of each object to be swung. During the game, the local terminal device or server updates the data structure by capturing the player's game data. When the local terminal device or server determines the displacement information of the first sub-object in the current frame, it can search and find the relevant information in the data structure to determine the influencing factors when determining the displacement information of the first sub-object in the current frame, that is, the associated displacement information.

[0108] Optionally, continue to refer to Figure 7 As shown, taking the first chain corresponding to the first game icon as an example, the absence of preset displacement information can be understood as the object to be swung where the first chain is located has not been hit in the current frame, that is, at this time, other objects to be swung may be hit in the current frame, and / or, the object to be swung where the first chain is located was hit and not responded to in the previous frame of the current frame, and / or, other objects to be swung were hit and not responded to in the previous frame of the current frame.

[0109] Among them, the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was not responded to in the previous frame, and the distance between other objects that were hit and not responded in the previous frame and the object to be swung.

[0110] Optionally, continue to refer to Figure 7 As shown, taking the first chain corresponding to the first game icon as an example, the distance between other objects hit in the current frame and the object to be swung can be understood as the distance between the third game icon and the first game icon, or the distance between the third game icon and the first chain when the object hit is the third game icon.

[0111] Optionally, continue to refer to Figure 6 as well as Figure 7 As shown, taking the current frame as t0+t and the object to be swung as the first chain corresponding to the first game icon as an example, the displacement information of the first sub-object that was not responded to in the previous frame can be understood as the displacement information corresponding to the impact effect F1 received by the first chain at t1 when the object being hit is the first game icon.

[0112] Optionally, continue to refer to Figure 6 as well as Figure 7 As shown, taking the current frame as t0+t and the object to be swung being the first chain corresponding to the first game icon as an example, the distance between the other objects that were hit and not responded to in the previous frame and the object to be swung can be understood as the distance between the third game icon and the first game icon, or the distance between the third game icon and the first chain when the third game icon is hit at t1.

[0113] By associating displacement information to determine the displacement information of the first sub-object, the player's different situations during the game can be taken into consideration, including the impact effect suffered by the object to be swung in the previous frame and the distance between the object to be swung and other objects to be swung, to accurately determine the displacement information of the first sub-object. This allows the swinging process of the object to be swung to respond instantly to the player's interactive operations, enriching the player's gaming experience.

[0114] As a possible implementation method, the displacement information of the first sub-object is determined according to the associated displacement information, including:

[0115] According to the associated displacement information, the influence displacement information corresponding to the first child object is determined.

[0116] Optionally, the local terminal device or the server superimposes the obtained associated displacement information to generate impact displacement information corresponding to the first sub-object, wherein the impact displacement information is used to indicate an offset of the first sub-object relative to the preset displacement information.

[0117] For example, continue to refer to Figure 7 As shown, taking the case where the object to be swung is the first chain corresponding to the first game icon, and the object to be hit is the third game icon as an example, the first influencing displacement information corresponding to the distance between the other objects hit in the current frame and the object to be swung can be obtained by multiplying the attenuation coefficient corresponding to the distance between the other objects and the object to be swung by the preset displacement information.

[0118] For example, continue to refer to Figure 6 as well as Figure 7 As shown, taking the current frame as t0+t and the object to be swung as the first chain corresponding to the first game icon as an example, the second impact displacement information corresponding to the displacement information of the first sub-object that was not responded to in the previous frame can be numerically the same as the preset displacement information.

[0119] For example, continue to refer to Figure 6 as well as Figure 7 As shown, taking the current frame as time t0+t and the object to be swung as the first chain corresponding to the first game icon as an example, the third influencing displacement information corresponding to the distance between other objects that were hit and not responded to in the previous frame and the object to be swung can be obtained by multiplying the attenuation coefficient corresponding to the distance between the other objects and the object to be swung by the preset displacement information.

[0120] Exemplarily, after obtaining the first influencing displacement information, the second influencing displacement information and the third influencing displacement information, the first influencing displacement information, the second influencing displacement information and the third influencing displacement information may be summed or multiplied to obtain the influencing displacement information corresponding to the first sub-object.

[0121] The displacement information of the affected object will be taken as the displacement information of the first child object.

[0122] Optionally, the affected displacement information is used as the displacement information of the first child object.

[0123] As a possible implementation, when only the impact effect on the object to be swung in the current frame needs to be comprehensively considered, the displacement information of the first sub-object in the object to be swung in S502 above is determined, including:

[0124] Use the preset displacement information as the displacement information of the first child object.

[0125] Optionally, continue to refer to Figure 7 As shown, taking the first chain corresponding to the first game icon as an example, the preset displacement information can be understood as the displacement information corresponding to the impact effect F2 received by the object to be swung when the object to be swung is the first game icon, that is, the displacement information corresponding to the current object to be swung when the object to be swung is the first game icon.

[0126] Exemplarily, the preset displacement information of each object to be swung may be the same value, so as to present the real physical swinging effect of chains of the same mass when being hit by different forces. Exemplarily, the preset displacement information of each object to be swung may also be different values, so as to present the real physical swinging effect of chains of different masses when being hit by different forces.

[0127] It can be understood that the above is an example of determining the displacement information of the first sub-object by taking only one object to be swung being hit as an example. When the number of objects to be swung that are hit increases, the effects of the hits on the objects to be swung can be superimposed on the basis of the above embodiments, and this application will not elaborate on this. The following is an example of determining the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame.

[0128] As a possible implementation, Figure 8 A schematic diagram of a flow chart for determining target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame in the object swing control method provided in the embodiment of the present application, with reference to Figure 8 As shown, the above S503 includes:

[0129] S801, determining target position information and target angle information of a first sub-object in the object to be swung according to displacement information of the first sub-object, current position information of the first sub-object, and current angle information of the first sub-object.

[0130] Optionally, after obtaining the displacement information of the first sub-object, the target position information and target angle information of the first sub-object in the object to be swung in the next frame can be calculated based on the displacement information of the first sub-object, the current position information of the first sub-object and the current angle information.

[0131] Exemplarily, the displacement information of the first sub-object can be superimposed on the current position information of the first sub-object to obtain the target position information of the first sub-object in the next frame, and the displacement information of the first sub-object can be superimposed on the current angle information of the first sub-object to obtain the target angle information of the first sub-object in the next frame.

[0132] Exemplarily, the displacement information of the first sub-object can be superimposed on the current position information of the first sub-object to obtain the target position information of the first sub-object in the next frame, and the target angle information of the first sub-object in the next frame can be calculated based on the target position information of the first sub-object and the current angle information of the first sub-object.

[0133] S802: Determine target position information and target angle information of each sub-object except the first sub-object according to the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object.

[0134] Optionally, after obtaining the target position information and target angle information of the first sub-object, the target position information and target angle information of each sub-object except the first sub-object can be calculated based on the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object.

[0135] Exemplarily, after obtaining the target position information and target angle information of the first sub-object, the target position information of each sub-object except the first sub-object can be calculated based on the target position information of the first sub-object, the current position information of each sub-object except the first sub-object, and the distance between each sub-object except the first sub-object and the first sub-object, and the target angle information of each sub-object except the first sub-object can be calculated based on the target angle information of the first sub-object, the current angle information of each sub-object except the first sub-object, and the distance between each sub-object except the first sub-object and the first sub-object.

[0136] The target position information and target angle information of the first sub-object in the object to be swung are determined through the displacement information of the first sub-object, the current position information of the first sub-object, and the current angle information of the first sub-object. The target position information and target angle information of each sub-object except the first sub-object are determined through the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object. When the object to be swung is swung, the swinging process of each sub-object is more continuous, coherent and realistic, thereby enhancing the player's sense of immersion in the game.

[0137] As a possible implementation, Fig. 9 A schematic diagram of a flow chart for determining the target position information and target angle information of the first sub-object in the object to be swung in the object swing control method provided in the embodiment of the present application, referring to Fig. 9 As shown, the above S801 includes:

[0138] S901. Determine target position information of the first sub-object according to displacement information of the first sub-object and current position information of the first sub-object.

[0139] Optionally, based on the current position information of the first sub-object, the displacement information of the first sub-object is superimposed to obtain the target position information of the first sub-object, wherein the superposition can be performed by frog leaping integration method, interpolation algorithm and numerical integration algorithm (such as trapezoidal method, Simpson method, etc.).

[0140] S902: Determine target angle information of the first sub-object according to the displacement information of the first sub-object and the current angle information of the first sub-object.

[0141] Optionally, based on the current angle information of the first sub-object, the displacement information of the first sub-object is superimposed to obtain the target angle information of the first sub-object. The superposition can be performed by a geometric transformation algorithm, a frog leaping integral method, an Euler angle method, an interpolation algorithm, a Kalman filter algorithm, or the like.

[0142] As a possible implementation, Fig.10 A schematic diagram of a flow chart for determining the target position information of the first sub-object in the object swing control method provided in the embodiment of the present application, referring to Fig.10 As shown, the above S901 includes:

[0143] S1001. Determine the displacement acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object.

[0144] Optionally, the displacement information of the first sub-object may be used as the force information of the first sub-object at the current position information, and a force analysis may be performed to calculate the displacement acceleration of the first sub-object in the current frame.

[0145] Optionally, after obtaining the displacement acceleration of the first sub-object in the current frame, the displacement acceleration of the current frame may be multiplied by a preset friction or air resistance coefficient so that the displacement acceleration of the current frame more closely simulates the real physical swing, thereby obtaining an updated displacement acceleration.

[0146] S1002: Determine the displacement speed of the first sub-object in the next half frame of the current frame according to the displacement acceleration of the first sub-object in the current frame.

[0147] Optionally, the displacement speed of the first sub-object in the next half frame of the current frame is calculated according to the displacement acceleration of the first sub-object in the current frame.

[0148] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the displacement velocity v1(t+1 / 2T) of the first sub-object at time t0+1 / 2T can be calculated based on the displacement acceleration a1(t0) of the first sub-object at time t0 and referring to the following formula (1):

[0149]

[0150] The displacement velocity v1(t0) at time t0 is the average of the displacement velocity v1(t-1 / 2T) at time t0-1 / 2T and the displacement velocity v1(t+1 / 2T) at time t0+1 / 2T.

[0151] S1003 : Determine target position information of the first sub-object according to the current position information of the first sub-object and the displacement speed of the first sub-object in the next half frame of the current frame.

[0152] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the target position information x1(t0+T) of the first sub-object can be calculated based on the current position information x1(t0) of the first sub-object and the displacement speed v1(t+1 / 2T) of the first sub-object at time t0+1 / 2T, referring to the following formula (2):

[0153] x1(t0+T)=x1(t0)+v1(t+1 / 2T)T (2)

[0154] The displacement acceleration of the first sub-object in the current frame is determined through the displacement information of the first sub-object and the current position information of the first sub-object, and the displacement speed of the first sub-object in the next half frame of the current frame is determined through the displacement acceleration of the first sub-object in the current frame, so that the target position information of the first sub-object can be determined according to the current position information of the first sub-object and the displacement speed of the first sub-object in the next half frame of the current frame, so that the calculation of position and speed can be performed alternately in time, the speed calculation of each step is at the midpoint of the position, and the update of each step of the position is at the midpoint of the speed, so that the position change of the first sub-object in the swinging process more simulates the real physical swing.

[0155] As a possible implementation, Fig.11 A schematic diagram of a flow chart for determining the target angle information of the first sub-object in the object swing control method provided in the embodiment of the present application, referring to Fig.11 As shown, the above S902 includes:

[0156] S1101. Determine the angular acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object.

[0157] Optionally, the displacement information of the first sub-object may be used as the force information of the first sub-object under the current angle information, and a force analysis may be performed to calculate the angular acceleration of the first sub-object in the current frame.

[0158] Optionally, after obtaining the angular acceleration of the first sub-object in the current frame, the angular acceleration of the current frame may be multiplied by a preset friction or air resistance coefficient so that the angular acceleration of the current frame more closely simulates the real physical swing, thereby obtaining an updated angular acceleration.

[0159] S1102: Determine the rotation speed of the first sub-object in the next half frame of the current frame according to the angular acceleration of the first sub-object in the current frame.

[0160] Optionally, the angular velocity of the first sub-object in the next half frame of the current frame is calculated according to the angular acceleration of the first sub-object in the current frame.

[0161] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the angular velocity u1(t+1 / 2T) of the first sub-object at time t0+1 / 2T can be calculated based on the angular acceleration b1(t0) of the first sub-object at time t0 and referring to the following formula (3):

[0162]

[0163] The angular velocity u1(t0) at time t0 is the average of the angular velocity u1(t-1 / 2T) at time t0-1 / 2T and the angular velocity u1(t+1 / 2T) at time t0+1 / 2T.

[0164] S1103 , determining target angle information of the first sub-object according to the current angle information of the first sub-object and the rotation speed of the first sub-object in the next half frame of the current frame.

[0165] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the target angle information w1(t0+T) of the first sub-object can be calculated based on the current angle information w1(t0) of the first sub-object and the angular velocity u1(t+1 / 2T) of the first sub-object at time t0+1 / 2T, referring to the following formula (4):

[0166] w1(t0+T)=w1(t0)+u1(t+1 / 2T)T (4)

[0167] The angular acceleration of the first sub-object in the current frame is determined through the displacement information of the first sub-object and the current angle information of the first sub-object, and the angular speed of the first sub-object in the next half frame of the current frame is determined through the angular acceleration of the first sub-object in the current frame. Therefore, the target angle information of the first sub-object can be determined according to the current angle information of the first sub-object and the angular speed of the first sub-object in the next half frame of the current frame, so that the calculation of the angle and speed can be performed alternately in time, the speed calculation of each step is at the midpoint of the angle, and the update of each step of the angle is at the midpoint of the speed, so that the rotation change of the first sub-object during the swinging process more simulates the real physical swing.

[0168] The above is an exemplary description of the process of determining the target position information and target angle information of the first sub-object. After obtaining the target position information and target angle information of the first sub-object, the target position information and target angle information of each sub-object except the first sub-object can be determined based on the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object. An exemplary description is given below.

[0169] As a possible implementation manner, the above S802 includes:

[0170] The target position information and target angle information of each sub-object except the first sub-object are determined based on the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, wherein the current sub-object is any sub-object except the first sub-object.

[0171] Optionally, taking any sub-object except the first sub-object as an example, the target position information and target angle information of each sub-object except the first sub-object can be determined based on the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, so that the swinging process of the object to be swung is more coherent, and the updates between multiple frames are more connected and smoother.

[0172] The constraint information of the current sub-object is used to indicate the position constraint information and / or angle constraint information between the current sub-object and the previous sub-object and / or the next sub-object.

[0173] As a possible implementation, Fig.12 A schematic diagram of a flow chart for determining target position information and target angle information of each sub-object except the first sub-object in the object swing control method provided in the embodiment of the present application, referring to Fig.12 As shown, the above steps can be performed according to the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object to determine the target position information and target angle information of each sub-object except the first sub-object, which specifically includes:

[0174] S1201. Determine displacement information of the current sub-object according to constraint information of the current sub-object and target position information of the previous sub-object.

[0175] Optionally, the displacement information of the current sub-object may be calculated based on the target position information of the previous sub-object and the position constraint information in the constraint information of the current sub-object.

[0176] The displacement information of the current sub-object is used to indicate the magnitude of the position change of the current sub-object in the next frame due to the influence of the previous sub-object.

[0177] S1202: Determine target position information of the current sub-object according to displacement information of the current sub-object and current position information of the current sub-object.

[0178] Optionally, based on the current position information of the current sub-object, the displacement information of the current sub-object is superimposed to obtain the target position information of the current sub-object, wherein the superposition can be performed by frog leaping integration method, interpolation algorithm and numerical integration algorithm (such as trapezoidal method, Simpson method, etc.).

[0179] S1203: Determine target angle information of the current sub-object according to displacement information of the current sub-object, current angle information of the current sub-object, and target angle information of the previous sub-object.

[0180] Optionally, based on the current angle information of the current sub-object, the displacement information of the current sub-object is superimposed to obtain the target angle information of the current sub-object, wherein the superposition can be performed by a geometric transformation algorithm, a frog leaping integral method, an Euler angle method, an interpolation algorithm, a Kalman filter algorithm, and the like.

[0181] As a possible implementation, Fig.13 A schematic diagram of a flow chart for determining the target position information of the current sub-object in the object swing control method provided in the embodiment of the present application, referring to Fig.13 As shown, the above S1202 includes:

[0182] S1301. Determine the displacement acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object.

[0183] Optionally, the displacement information of the current sub-object may be used as the force information of the current sub-object at the current position information, and a force analysis may be performed to calculate the displacement acceleration of the current sub-object in the current frame.

[0184] Optionally, after obtaining the displacement acceleration of the current sub-object in the current frame, the displacement acceleration of the current frame may be multiplied by a preset friction or air resistance coefficient so that the displacement acceleration of the current frame more closely simulates the real physical swing, thereby obtaining an updated displacement acceleration.

[0185] S1302: Determine the displacement speed of the current sub-object in the next half frame of the current frame according to the displacement acceleration of the current sub-object in the current frame.

[0186] Optionally, the displacement speed of the current sub-object in the next half frame of the current frame is calculated according to the displacement acceleration of the current sub-object in the current frame.

[0187] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the displacement velocity vn(t+1 / 2T) of the current sub-object at time t0+1 / 2T can be calculated based on the displacement acceleration an(t0) of the current sub-object at time t0 and referring to the following formula (5):

[0188]

[0189] The displacement velocity vn(t0) at time t0 is the average of the displacement velocity vn(t-1 / 2T) at time t0-1 / 2T and the displacement velocity vn(t+1 / 2T) at time t0+1 / 2T.

[0190] S1303: Determine target position information of the current sub-object according to the current position information of the current sub-object and the displacement speed of the current sub-object in the next half frame of the current frame.

[0191] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the target position information xn(t0+T) of the current sub-object can be calculated based on the current position information xn(t0) of the current sub-object and the displacement speed vn(t+1 / 2T) of the current sub-object at time t0+1 / 2T, referring to the following formula (6):

[0192] xn(t0+T)=xn(t0)+vn(t+1 / 2T)T (6)

[0193] The displacement acceleration of the current sub-object in the current frame is determined through the displacement information of the current sub-object and the current position information of the current sub-object, and the displacement speed of the current sub-object in the next half frame of the current frame is determined through the displacement acceleration of the current sub-object in the current frame, so that the target position information of the current sub-object can be determined according to the current position information of the current sub-object and the displacement speed of the current sub-object in the next half frame of the current frame, and the calculation of position and speed can be performed alternately in time, the speed calculation of each step is at the midpoint of the position, and the update of each step of the position is at the midpoint of the speed, so that the position change of the current sub-object in the swinging process more simulates the real physical swing.

[0194] As a possible implementation, Fig.14 A schematic diagram of a flow chart for determining the target angle information of the current sub-object in the object swing control method provided in the embodiment of the present application, referring to Fig.14 As shown, the above S1203 includes:

[0195] S1401. Determine candidate angle information of the current sub-object according to displacement information of the current sub-object and current angle information of the current sub-object.

[0196] Optionally, based on the current angle information of the current sub-object, the displacement information of the current sub-object is superimposed to obtain the candidate angle information of the current sub-object, wherein the superposition can be performed by a geometric transformation algorithm, a frog leaping integral method, an Euler angle method, an interpolation algorithm, a Kalman filter algorithm, and the like.

[0197] S1402: Determine target angle information of the current sub-object according to candidate angle information of the current sub-object and target angle information of the previous sub-object.

[0198] Optionally, since each sub-object is pulled by the previous sub-object and the next sub-object during the rotation process, after calculating the alternative angle information of the current sub-object, the target angle information of the current sub-object can be calculated based on the alternative angle information of the current sub-object and the target angle information of the previous sub-object, thereby making the rotation process of each sub-object more coherent and realistic.

[0199] As a possible implementation, Fig.15 A schematic diagram of a flow chart for determining candidate angle information of a current sub-object in the object swing control method provided in an embodiment of the present application, referring to Fig.15 As shown, the above S1401 includes:

[0200] S1501. Determine the angular acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object.

[0201] Optionally, the displacement information of the current sub-object may be used as the force information of the current sub-object under the current angle information, and a force analysis may be performed to calculate the angular acceleration of the current sub-object in the current frame.

[0202] Optionally, after obtaining the angular acceleration of the current sub-object in the current frame, the angular acceleration of the current frame may be multiplied by a preset friction or air resistance coefficient so that the angular acceleration of the current frame more closely simulates the real physical swing, thereby obtaining an updated angular acceleration.

[0203] S1502: Determine the rotation speed of the current sub-object in the next half frame of the current frame according to the angular acceleration of the current sub-object in the current frame.

[0204] Optionally, the angular velocity of the first sub-object in the next half frame of the current frame is calculated according to the angular acceleration of the first sub-object in the current frame.

[0205] For example, continue to refer to Figure 6As shown, taking the current frame as time t0 as an example, the angular velocity un(t+1 / 2T) of the first sub-object at time t0+1 / 2T can be calculated based on the angular acceleration bn(t0) of the first sub-object at time t0 and referring to the following formula (7):

[0206]

[0207] The angular velocity un(t0) at time t0 is the average of the angular velocity un(t-1 / 2T) at time t0-1 / 2T and the angular velocity un(t+1 / 2T) at time t0+1 / 2T.

[0208] S1503: Determine candidate angle information of the current sub-object according to the current angle information of the current sub-object and the rotation speed of the current sub-object in the next half frame of the current frame.

[0209] For example, continue to refer to Figure 6 As shown, taking the current frame as time t0 as an example, the candidate angle information wn(t0+T) of the first sub-object can be calculated according to the current angle information wn(t0) of the first sub-object and the angular velocity un(t+1 / 2T) of the first sub-object at time t0+1 / 2T, referring to the following formula (8):

[0210] wn(t0+T)=wn(t0)+un(t+1 / 2T)T (8)

[0211] The angular acceleration of the current sub-object in the current frame is determined through the displacement information of the current sub-object and the current angle information of the current sub-object, and the angular speed of the current sub-object in the next half frame of the current frame is determined through the angular acceleration of the current sub-object in the current frame. Therefore, according to the current angle information of the current sub-object and the angular speed of the current sub-object in the next half frame of the current frame, the alternative angle information of the current sub-object can be determined, and the calculation of the angle and speed can be performed alternately in time, the speed calculation of each step is at the midpoint of the angle, and the update of each step of the angle is at the midpoint of the speed, so that the rotation change of the current sub-object during the swinging process more simulates the real physical swing.

[0212] As a possible implementation manner, the above S1402 determines the target angle information of the current sub-object according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object, including:

[0213] Calculate the average of the candidate angle information of the current sub-object and the target angle information of the previous sub-object, and compare the average with the preset angle threshold. If the average is less than the preset angle threshold, the average is used as the target angle information of the current sub-object. If not, the angle threshold is used as the target angle information of the current sub-object.

[0214] Optionally, the average value of the alternative angle information of the current sub-object and the target angle information of the previous sub-object can be calculated, and the average value can be compared with a preset angle threshold. If the average value is less than the preset angle threshold, the average value is used as the target angle information of the current sub-object. If not, the angle threshold is used as the target angle information of the current sub-object, thereby making the target angle information of the current sub-object more reasonable.

[0215] 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.

[0216] Fig.16 A schematic diagram of an object swing control device provided in an embodiment of the present application, referring to Fig.16 As shown, the device includes: an acquisition module 1601, a first determination module 1602, a second determination module 1603 and a display module 1604; wherein,

[0217] The acquisition module 1601 is used to acquire the current position information and the current angle information of each sub-object in the object to be swung in the current frame, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order;

[0218] A first determining module 1602 is used to determine the displacement information of the first sub-object in the object to be swung;

[0219] The second determination module 1603 is used to determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object;

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

[0221] As a possible implementation manner, the first determining module 1602 is specifically configured to:

[0222] The displacement information of the first sub-object is determined based on the associated displacement information and the preset displacement information, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

[0223] As a possible implementation manner, the first determining module 1602 is specifically configured to:

[0224] Determine the impact displacement information corresponding to the first sub-object according to the associated displacement information;

[0225] The sum of the affected displacement information and the preset displacement information will be used as the displacement information of the first child object.

[0226] As a possible implementation method, determining the displacement information of the first sub-object in the object to be swung includes:

[0227] Based on the associated displacement information, the displacement information of the first sub-object is determined, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

[0228] As a possible implementation method, the displacement information of the first sub-object is determined according to the associated displacement information, including:

[0229] Determine the impact displacement information corresponding to the first sub-object according to the associated displacement information;

[0230] The displacement information of the affected object will be taken as the displacement information of the first child object.

[0231] As a possible implementation manner, the first determining module 1602 is specifically configured to:

[0232] Use the preset displacement information as the displacement information of the first child object.

[0233] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0234] Determine the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object;

[0235] The target position information and target angle information of each sub-object except the first sub-object are determined according to the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object.

[0236] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0237] Determine target position information of the first sub-object according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0238] The target angle information of the first sub-object is determined according to the displacement information of the first sub-object and the current angle information of the first sub-object.

[0239] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0240] Determine the displacement acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0241] According to the displacement acceleration of the first sub-object in the current frame, determine the displacement speed of the first sub-object in the next half frame of the current frame;

[0242] The target position information of the first sub-object is determined according to the current position information of the first sub-object and the displacement speed of the first sub-object in the next half frame of the current frame.

[0243] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0244] Determine the angular acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0245] According to the angular acceleration of the first sub-object in the current frame, determine the rotation speed of the first sub-object in the next half frame of the current frame;

[0246] The target angle information of the first sub-object is determined according to the current angle information of the first sub-object and the rotation speed of the first sub-object in the next half frame of the current frame.

[0247] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0248] The target position information and target angle information of each sub-object except the first sub-object are determined based on the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, wherein the current sub-object is any sub-object except the first sub-object.

[0249] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0250] Determine the displacement information of the current sub-object according to the constraint information of the current sub-object and the target position information of the previous sub-object;

[0251] Determine the target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0252] The target angle information of the current sub-object is determined according to the displacement information of the current sub-object, the current angle information of the current sub-object and the target angle information of the previous sub-object.

[0253] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0254] Determine the displacement acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0255] According to the displacement acceleration of the current sub-object in the current frame, determine the displacement speed of the current sub-object in the next half frame of the current frame;

[0256] The target position information of the current sub-object is determined according to the current position information of the current sub-object and the displacement speed of the current sub-object in the next half frame of the current frame.

[0257] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0258] Determine candidate angle information of the current sub-object according to the displacement information of the current sub-object and the current angle information of the current sub-object;

[0259] The target angle information of the current sub-object is determined according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object.

[0260] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0261] Determine the angular acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0262] According to the angular acceleration of the current sub-object in the current frame, determine the rotation speed of the current sub-object in the next half frame of the current frame;

[0263] According to the current angle information of the current sub-object and the rotation speed of the current sub-object in the next half frame of the current frame, the candidate angle information of the current sub-object is determined.

[0264] As a possible implementation manner, the second determining module 1603 is specifically configured to:

[0265] Calculate the average of the candidate angle information of the current sub-object and the target angle information of the previous sub-object, and compare the average with the preset angle threshold. If the average is less than the preset angle threshold, the average is used as the target angle information of the current sub-object. If not, the angle threshold is used as the target angle information of the current sub-object.

[0266] The embodiment of the present application obtains the current position information and current angle information of each sub-object in the object to be swung in the current frame, and determines the displacement information of the first sub-object in the object to be swung, so that the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame can be determined according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, so that the object to be swung is rendered and displayed in the next frame of the current frame according to the target position information and the target angle information of each sub-object, so that the object to be swung of any length can present a real physical swing during the player's play, thereby improving the player's gaming experience. At the same time, due to First, the displacement information of the first sub-object is determined, and the target position information and target angle information of each sub-object are determined based on the displacement information of the first sub-object, so that when the object to be swung is swung, the swinging process of each sub-object more simulates the physical real swing, thereby enhancing the player's immersion in the game. In addition, since only the calculation of displacement and angle is involved, the present application can also reduce the computational complexity of electronic equipment calculations during the game. Moreover, since the present application only needs to obtain the current position information and current angle information of each sub-object in the object to be swung in the current frame to achieve swing control, the present application has high reusability and can be extended to any scenario where an object needs to be swung.

[0267] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0268] The present application also provides an electronic device, such as Fig.17 As shown, Fig.17 The structural diagram of the electronic device provided in the embodiment of the present application includes: a processor 1701, a memory 1702, and optionally, a bus 1703. The memory 1702 stores machine-readable instructions executable by the processor 1701 (for example, Fig.16 In the device, the acquisition module 1601, the first determination module 1602, the second determination module 1603 and the display module 1604 corresponding execution instructions, etc., when the electronic device 1700 is running, the processor 1701 communicates with the memory 1702 through the bus 1703, and the machine-readable instructions are executed by the processor 1701 to perform the following processing:

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

[0270] Determine the displacement information of the first sub-object in the object to be swung;

[0271] Determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object;

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

[0273] In a possible implementation manner, when determining the displacement information of the first sub-object in the object to be swung, the processor 1701 is specifically configured to:

[0274] The displacement information of the first sub-object is determined based on the associated displacement information and the preset displacement information, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

[0275] In a possible implementation manner, when the processor 1701 determines the displacement information of the first sub-object according to the associated displacement information and the preset displacement information, it is specifically configured to:

[0276] Determine the impact displacement information corresponding to the first sub-object according to the associated displacement information;

[0277] The sum of the affected displacement information and the preset displacement information will be used as the displacement information of the first child object.

[0278] In a possible implementation manner, when determining the displacement information of the first sub-object in the object to be swung, the processor 1701 is specifically configured to:

[0279] Based on the associated displacement information, the displacement information of the first sub-object is determined, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

[0280] In a possible implementation manner, when the processor 1701 determines the displacement information of the first sub-object according to the associated displacement information, it is specifically configured to:

[0281] Determine the impact displacement information corresponding to the first sub-object according to the associated displacement information;

[0282] The displacement information of the affected object will be taken as the displacement information of the first child object.

[0283] In a possible implementation manner, when determining the displacement information of the first sub-object in the object to be swung, the processor 1701 is specifically configured to:

[0284] Use the preset displacement information as the displacement information of the first child object.

[0285] In a possible implementation manner, when the processor 1701 determines the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, it is specifically used to:

[0286] Determine the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object;

[0287] The target position information and target angle information of each sub-object except the first sub-object are determined according to the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object.

[0288] In a possible implementation manner, when the processor 1701 determines the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object, it is specifically configured to:

[0289] Determine target position information of the first sub-object according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0290] The target angle information of the first sub-object is determined according to the displacement information of the first sub-object and the current angle information of the first sub-object.

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

[0292] Determine the displacement acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0293] According to the displacement acceleration of the first sub-object in the current frame, determine the displacement speed of the first sub-object in the next half frame of the current frame;

[0294] The target position information of the first sub-object is determined according to the current position information of the first sub-object and the displacement speed of the first sub-object in the next half frame of the current frame.

[0295] In a possible implementation manner, when the processor 1701 determines the target angle information of the first sub-object according to the displacement information of the first sub-object and the current angle information of the first sub-object, it is specifically configured to:

[0296] Determine the angular acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0297] According to the angular acceleration of the first sub-object in the current frame, determine the rotation speed of the first sub-object in the next half frame of the current frame;

[0298] The target angle information of the first sub-object is determined according to the current angle information of the first sub-object and the rotation speed of the first sub-object in the next half frame of the current frame.

[0299] In a possible implementation manner, when the processor 1701 determines the target position information and target angle information of each sub-object except the first sub-object based on the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object, it is specifically configured to:

[0300] The target position information and target angle information of each sub-object except the first sub-object are determined based on the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, wherein the current sub-object is any sub-object except the first sub-object.

[0301] In a possible implementation manner, when the processor 1701 determines the target position information and target angle information of each sub-object except the first sub-object according to the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, the processor 1701 is specifically configured to:

[0302] Determine the displacement information of the current sub-object according to the constraint information of the current sub-object and the target position information of the previous sub-object;

[0303] Determine the target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0304] The target angle information of the current sub-object is determined according to the displacement information of the current sub-object, the current angle information of the current sub-object and the target angle information of the previous sub-object.

[0305] In a possible implementation manner, when the processor 1701 determines the target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object, it is specifically configured to:

[0306] Determine the displacement acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0307] According to the displacement acceleration of the current sub-object in the current frame, determine the displacement speed of the current sub-object in the next half frame of the current frame;

[0308] The target position information of the current sub-object is determined according to the current position information of the current sub-object and the displacement speed of the current sub-object in the next half frame of the current frame.

[0309] In a possible implementation manner, when the processor 1701 determines the target angle information of the current sub-object according to the displacement information of the current sub-object, the current angle information of the current sub-object, and the target angle information of the previous sub-object, it is specifically configured to:

[0310] Determine candidate angle information of the current sub-object according to the displacement information of the current sub-object and the current angle information of the current sub-object;

[0311] The target angle information of the current sub-object is determined according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object.

[0312] In a possible implementation manner, when the processor 1701 determines the candidate angle information of the current sub-object according to the displacement information of the current sub-object and the current angle information of the current sub-object, it is specifically configured to:

[0313] Determine the angular acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0314] According to the angular acceleration of the current sub-object in the current frame, determine the rotation speed of the current sub-object in the next half frame of the current frame;

[0315] According to the current angle information of the current sub-object and the rotation speed of the current sub-object in the next half frame of the current frame, the candidate angle information of the current sub-object is determined.

[0316] In a possible implementation manner, when the processor 1701 determines the target angle information of the current sub-object according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object, it is specifically configured to:

[0317] Calculate the average of the candidate angle information of the current sub-object and the target angle information of the previous sub-object, and compare the average with the preset angle threshold. If the average is less than the preset angle threshold, the average is used as the target angle information of the current sub-object. If not, the angle threshold is used as the target angle information of the current sub-object.

[0318] Among them, the storage medium 1702 stores program code. When the program code is executed by the processor 1701, the processor 1701 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.

[0319] Processor 1701 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.

[0320] Storage medium 1702, 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, optical disk, 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 1702 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.

[0321] 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:

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

[0323] Determine the displacement information of the first sub-object in the object to be swung;

[0324] Determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object;

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

[0326] In a possible implementation manner, when determining the displacement information of the first sub-object in the object to be swung, the processor is specifically configured to:

[0327] The displacement information of the first sub-object is determined based on the associated displacement information and the preset displacement information, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

[0328] In a possible implementation manner, when the processor determines the displacement information of the first sub-object according to the associated displacement information and the preset displacement information, it is specifically configured to:

[0329] Determine the impact displacement information corresponding to the first sub-object according to the associated displacement information;

[0330] The sum of the affected displacement information and the preset displacement information will be used as the displacement information of the first child object.

[0331] In a possible implementation manner, when determining the displacement information of the first sub-object in the object to be swung, the processor is specifically configured to:

[0332] Based on the associated displacement information, the displacement information of the first sub-object is determined, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

[0333] In a possible implementation manner, when the processor determines the displacement information of the first sub-object according to the associated displacement information, it is specifically configured to:

[0334] Determine the impact displacement information corresponding to the first sub-object according to the associated displacement information;

[0335] The displacement information of the affected object will be taken as the displacement information of the first child object.

[0336] In a possible implementation manner, when determining the displacement information of the first sub-object in the object to be swung, the processor is specifically configured to:

[0337] Use the preset displacement information as the displacement information of the first child object.

[0338] In a possible implementation manner, when the processor determines the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object, it is specifically used to:

[0339] Determine the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object;

[0340] The target position information and target angle information of each sub-object except the first sub-object are determined according to the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object.

[0341] In a possible implementation manner, when the processor determines the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object, it is specifically configured to:

[0342] Determine target position information of the first sub-object according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0343] The target angle information of the first sub-object is determined according to the displacement information of the first sub-object and the current angle information of the first sub-object.

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

[0345] Determine the displacement acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0346] According to the displacement acceleration of the first sub-object in the current frame, determine the displacement speed of the first sub-object in the next half frame of the current frame;

[0347] The target position information of the first sub-object is determined according to the current position information of the first sub-object and the displacement speed of the first sub-object in the next half frame of the current frame.

[0348] In a possible implementation manner, when the processor determines the target angle information of the first sub-object according to the displacement information of the first sub-object and the current angle information of the first sub-object, it is specifically configured to:

[0349] Determine the angular acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object;

[0350] According to the angular acceleration of the first sub-object in the current frame, determine the rotation speed of the first sub-object in the next half frame of the current frame;

[0351] The target angle information of the first sub-object is determined according to the current angle information of the first sub-object and the rotation speed of the first sub-object in the next half frame of the current frame.

[0352] In a possible implementation manner, when the processor determines the target position information and target angle information of each sub-object except the first sub-object based on the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object, it is specifically configured to:

[0353] The target position information and target angle information of each sub-object except the first sub-object are determined based on the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, wherein the current sub-object is any sub-object except the first sub-object.

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

[0355] Determine the displacement information of the current sub-object according to the constraint information of the current sub-object and the target position information of the previous sub-object;

[0356] Determine the target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0357] The target angle information of the current sub-object is determined according to the displacement information of the current sub-object, the current angle information of the current sub-object and the target angle information of the previous sub-object.

[0358] In a possible implementation manner, when the processor determines the target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object, it is specifically configured to:

[0359] Determine the displacement acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0360] According to the displacement acceleration of the current sub-object in the current frame, determine the displacement speed of the current sub-object in the next half frame of the current frame;

[0361] The target position information of the current sub-object is determined according to the current position information of the current sub-object and the displacement speed of the current sub-object in the next half frame of the current frame.

[0362] In a possible implementation manner, when the processor determines the target angle information of the current sub-object according to the displacement information of the current sub-object, the current angle information of the current sub-object, and the target angle information of the previous sub-object, it is specifically configured to:

[0363] Determine candidate angle information of the current sub-object according to the displacement information of the current sub-object and the current angle information of the current sub-object;

[0364] The target angle information of the current sub-object is determined according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object.

[0365] In a possible implementation manner, when the processor determines the candidate angle information of the current sub-object according to the displacement information of the current sub-object and the current angle information of the current sub-object, it is specifically configured to:

[0366] Determine the angular acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object;

[0367] According to the angular acceleration of the current sub-object in the current frame, determine the rotation speed of the current sub-object in the next half frame of the current frame;

[0368] According to the current angle information of the current sub-object and the rotation speed of the current sub-object in the next half frame of the current frame, the candidate angle information of the current sub-object is determined.

[0369] In a possible implementation manner, when the processor determines the target angle information of the current sub-object according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object, it is specifically configured to:

[0370] Calculate the average of the candidate angle information of the current sub-object and the target angle information of the previous sub-object, and compare the average with the preset angle threshold. If the average is less than the preset angle threshold, the average is used as the target angle information of the current sub-object. If not, the angle threshold is used as the target angle information of the current sub-object.

[0371] 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.

[0372] 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.

[0373] 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.

[0374] 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.

[0375] 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.

[0376] 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.

[0377] 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 and current angle information of each sub-object in the object to be swung in the current frame, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order; Determine the displacement information of the first sub-object in the object to be swung; Determine target position information and target angle information of each sub-object in the object to be swung in a frame next to the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object; According to the target position information and the target angle 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 displacement information of the first sub-object in the object to be swung includes: The displacement information of the first sub-object is determined based on the associated displacement information and the preset displacement information, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the first sub-object that was hit but not responded to in the previous frame, and the distance between other objects that were hit and not responded to in the previous frame and the object to be swung.

3. The object swing control method according to claim 2, characterized in that: The step of determining the displacement information of the first sub-object according to the associated displacement information and the preset displacement information includes: Determining, according to the associated displacement information, the impact displacement information corresponding to the first sub-object; The sum of the impact displacement information and the preset displacement information is used as the displacement information of the first sub-object.

4. The object swing control method according to claim 1, characterized in that: The step of determining the displacement information of the first sub-object in the object to be swung includes: According to the associated displacement information, the displacement information of the first sub-object is determined, wherein the associated displacement information includes at least one of the following: the distance between other objects hit in the current frame and the object to be swung, the displacement information of the hit of the first sub-object that was not responded to in the previous frame, and the distance between other objects hit and not responded to in the previous frame and the object to be swung.

5. The object swing control method according to claim 4, characterized in that: The step of determining the displacement information of the first sub-object according to the associated displacement information includes: Determining, according to the associated displacement information, the impact displacement information corresponding to the first sub-object; The impact displacement information is used as the displacement information of the first sub-object.

6. The object swing control method according to claim 1, characterized in that: The step of determining the displacement information of the first sub-object in the object to be swung includes: The preset displacement information is used as the displacement information of the first sub-object.

7. The object swing control method according to claim 1, characterized in that: The step of determining target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object includes: Determine the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object; The target position information and target angle information of each sub-object except the first sub-object are determined according to the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object.

8. The object swing control method according to claim 7, characterized in that: Determining the target position information and target angle information of the first sub-object in the object to be swung according to the displacement information of the first sub-object, the current position information and the current angle information of the first sub-object includes: Determine target position information of the first sub-object according to the displacement information of the first sub-object and the current position information of the first sub-object; According to the displacement information of the first sub-object and the current angle information of the first sub-object, the target angle information of the first sub-object is determined.

9. The object swing control method according to claim 8, characterized in that: The step of determining the target position information of the first sub-object according to the displacement information of the first sub-object and the current position information of the first sub-object includes: Determine the displacement acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object; Determining the displacement speed of the first sub-object in the next half frame of the current frame according to the displacement acceleration of the first sub-object in the current frame; The target position information of the first sub-object is determined according to the current position information of the first sub-object and the displacement speed of the first sub-object in the next half frame of the current frame.

10. The object swing control method according to claim 8, characterized in that: The step of determining target angle information of the first sub-object according to displacement information of the first sub-object and current angle information of the first sub-object includes: Determine the angular acceleration of the first sub-object in the current frame according to the displacement information of the first sub-object and the current position information of the first sub-object; Determining a rotation speed of the first sub-object in the next half frame of the current frame according to the angular acceleration of the first sub-object in the current frame; The target angle information of the first sub-object is determined according to the current angle information of the first sub-object and the rotation speed of the first sub-object in the next half frame of the current frame.

11. The object swing control method according to claim 7, characterized in that: The step of determining the target position information and target angle information of each sub-object except the first sub-object according to the target position information and target angle information of the first sub-object and the current position information and current angle information of each sub-object except the first sub-object comprises: The target position information and target angle information of each sub-object except the first sub-object are determined based on the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object, wherein the current sub-object is any sub-object except the first sub-object.

12. The object swing control method according to claim 11, characterized in that: The step of determining the target position information and target angle information of each sub-object except the first sub-object according to the current position information and current angle information of the current sub-object, the target position information and target angle information of the previous sub-object of the current sub-object, and the constraint information of the current sub-object includes: Determining displacement information of the current sub-object according to constraint information of the current sub-object and target position information of the previous sub-object; Determining target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object; The target angle information of the current sub-object is determined according to the displacement information of the current sub-object, the current angle information of the current sub-object and the target angle information of the previous sub-object.

13. The object swing control method according to claim 12, characterized in that: The determining the target position information of the current sub-object according to the displacement information of the current sub-object and the current position information of the current sub-object includes: Determine the displacement acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object; Determining the displacement speed of the current sub-object in the next half frame of the current frame according to the displacement acceleration of the current sub-object in the current frame; The target position information of the current sub-object is determined according to the current position information of the current sub-object and the displacement speed of the current sub-object in the next half frame of the current frame.

14. The object swing control method according to claim 12, characterized in that: The determining the target angle information of the current sub-object according to the displacement information of the current sub-object, the current angle information of the current sub-object and the target angle information of the previous sub-object includes: Determining candidate angle information of the current sub-object according to the displacement information of the current sub-object and the current angle information of the current sub-object; The target angle information of the current sub-object is determined according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object.

15. The object swing control method according to claim 14, characterized in that: The determining, according to the displacement information of the current sub-object and the current angle information of the current sub-object, candidate angle information of the current sub-object includes: Determine the angular acceleration of the current sub-object in the current frame according to the displacement information of the current sub-object and the current position information of the current sub-object; Determining a rotation speed of the current sub-object in the next half frame of the current frame according to the angular acceleration of the current sub-object in the current frame; According to the current angle information of the current sub-object and the rotation speed of the current sub-object in the next half frame of the current frame, the candidate angle information of the current sub-object is determined.

16. The object swing control method according to claim 14, characterized in that: The determining the target angle information of the current sub-object according to the candidate angle information of the current sub-object and the target angle information of the previous sub-object includes: Calculate the average value of the alternative angle information of the current sub-object and the target angle information of the previous sub-object, and compare the average value with a preset angle threshold. If the average value is less than the preset angle threshold, use the average value as the target angle information of the current sub-object; if not, use the angle threshold as the target angle information of the current sub-object.

17. An object swing control device, characterized in that: include: An acquisition module, used for acquiring current position information and current angle information of each sub-object in the object to be swung in a current frame, wherein each sub-object in the object to be swung is arranged in sequence according to a preset order; A first determining module, used to determine the displacement information of the first sub-object in the object to be swung; A second determination module is used to determine the target position information and target angle information of each sub-object in the object to be swung in the next frame of the current frame according to the displacement information of the first sub-object, the current position information and the current angle information of each sub-object; The display module is used to render and display the object to be swung in a frame next to the current frame according to the target position information and the target angle information of each sub-object.

18. 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 16.

19. 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 16 are executed.