Collision simulation method and device of virtual moving object, electronic equipment and medium

By obtaining and processing the parameters of virtual moving objects and arc collision areas in the 2D user interface, and generating collision simulation paths, the physical collision simulation problem of arc plane areas is solved, and the experience and computing efficiency are improved.

CN119830592AActive Publication Date: 2025-04-15NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510016873.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-04-15
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The prior art is difficult to perform physical collision simulation of arc-shaped plane areas in a 2D user interface, and complex physical calculations affect the calculation rate.

Method used

By obtaining the attribute parameters of the virtual moving object, the attribute parameters of the arc collision area and the motion parameters, perform collision simulation, and generate the collision simulation path of the virtual moving object to control its motion in the arc plane area.

Benefits of technology

It realizes physical collision simulation in arc-shaped plane areas, improves visual experience, simplifies the physical simulation process, and improves the calculation rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830592A_ABST
    Figure CN119830592A_ABST
Patent Text Reader

Abstract

The invention provides a collision simulation method and device for a virtual moving object, electronic equipment and a medium, and the method comprises the steps: obtaining the attribute parameters of the virtual moving object, the attribute parameters of an arc collision region, and the motion parameters of the virtual moving object, the attribute parameters of the virtual moving object comprise the starting point of the virtual moving object, the arc collision region and the motion parameters of the virtual moving object; the attribute parameters of the arc-shaped collision area comprise a reference point in the arc-shaped collision area, and the motion parameters comprise the number of target collision times and a stop point in the arc-shaped collision area, and according to the starting point, the reference point, the number of target collision times and the stop point, performing collision simulation on the virtual moving object in the arc-shaped collision area, and obtaining a plurality of intersection points of the virtual moving object and the arc-shaped edge of the arc-shaped collision area, and generating a collision simulation path of the virtual moving object according to the starting point, the plurality of intersection points and the stopping point. Therefore, on the premise of determining the stop point, the process of carrying out physical collision simulation in the arc-shaped plane area is simulated, and the experience feeling is more real.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and medium for simulating collision of virtual moving objects. Background Art

[0002] Collision simulation refers to shooting at a virtual moving object at a certain speed into a certain area, and the virtual moving object slows down and stops at a certain position after a series of collisions.

[0003] In the related art, a common physical collision simulation is to use a physical simulation method of a 3D physical engine to perform collision simulation of virtual moving objects, and another scenario of physical collision simulation is to perform collision simulation of virtual moving objects on a 2D user interface.

[0004] However, 3D collision simulation is not applicable to 2D user interfaces, and current physical collision simulation on 2D user interfaces is mainly used for rectangular lottery areas, and is not applicable to circular areas with curved edges. Summary of the invention

[0005] In view of this, embodiments of the present application provide a method, device, electronic device and medium for simulating the collision of a virtual moving object to implement a process of simulating physical collision in an arc-shaped plane area.

[0006] In a first aspect, an embodiment of the present application provides a collision simulation method for a virtual moving object, comprising:

[0007] Acquire attribute parameters of a virtual moving object, attribute parameters of an arc collision area, and motion parameters of the virtual moving object; the attribute parameters of the virtual moving object include: a starting point of the virtual moving object, the attribute parameters of the arc collision area include: a reference point within the arc collision area, and the motion parameters include: a target collision number and a stop point within the arc collision area;

[0008] According to the starting point, the reference point, the target collision number and the stop point, a collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of intersection points of the virtual moving object and the arc-shaped edge of the arc-shaped collision area;

[0009] A collision simulation path of the virtual moving object is generated according to the starting point, the multiple intersection points and the stopping point, so as to control the virtual moving object to move from the starting point to the stopping point.

[0010] In a second aspect, an embodiment of the present application further provides a collision simulation device for a virtual moving object, comprising:

[0011] An acquisition module, used to acquire attribute parameters of a virtual motion object, attribute parameters of an arc collision area, and motion parameters of the virtual motion object; the attribute parameters of the virtual motion object include: a starting point of the virtual motion object, the attribute parameters of the arc collision area include: a reference point within the arc collision area, and the motion parameters include: a target collision number and a stop point within the arc collision area;

[0012] a processing module, configured to perform a collision simulation on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the target collision number and the stop point, so as to obtain a plurality of intersection points between the virtual moving object and the arc-shaped edge of the arc-shaped collision area;

[0013] A generating module is used to generate a collision simulation path of the virtual moving object according to the starting point, the multiple intersection points and the stopping point, so as to control the virtual moving object to move from the starting point to the stopping point.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to execute any one of the methods described in the first aspect.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the first aspects is executed.

[0016] The present application provides a method, device, electronic device and medium for simulating the collision of a virtual moving object. The method includes: obtaining the attribute parameters of the virtual moving object, the attribute parameters of the arc collision area and the motion parameters of the virtual moving object. The attribute parameters of the virtual moving object include: the starting point of the virtual moving object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area. According to the starting point, the reference point, the number of target collisions and the stop point, the virtual moving object is subjected to collision simulation in the arc collision area to obtain multiple intersections of the arc edge of the virtual moving object and the arc collision area, and the collision simulation path of the virtual moving object is generated according to the starting point, the multiple intersections and the stop point. Thus, under the premise of determining the stop point, the process of physical collision simulation in the arc plane area is simulated, and the experience is more realistic. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 1 ;

[0019] Figure 2 Schematic diagram of a graphical user interface provided in an embodiment of the present application Figure 1 ;

[0020] Figure 3 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 2 ;

[0021] Figure 4 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 3 ;

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

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

[0024] Figure 7 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 4 ;

[0025] Figure 8 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 5 ;

[0026] Fig. 9 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 6 ;

[0027] Fig.10 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 7 ;

[0028] Fig.11 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 8 ;

[0029] Fig.12 A schematic diagram of the structure of a collision simulation device for a virtual moving object provided in an embodiment of the present application;

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

[0031] 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. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different 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.

[0032] Currently, 3D collision simulation is not suitable for 2D user interfaces, and it is difficult to stop deterministically at a pre-required position. The current physical collision simulation on 2D user interfaces is mainly used for rectangular lottery areas and is not suitable for circular areas with arc-shaped edges. In addition, due to the introduction of physical concepts such as the mass and friction coefficient of virtual moving objects to calculate the movement speed, the calculation of the user interface is too complex, which affects the calculation rate.

[0033] Based on this, the present application provides a collision simulation method for a virtual moving object, which can generate a collision simulation path for a virtual moving object for a curved plane area, thereby realizing the process of physical collision simulation in the curved plane area and improving the visual experience.

[0034] One possible application scenario of this application is the game lottery scenario. In game development, the lottery system is a common player incentive mechanism. Through the lottery, players can obtain various rewards in the game, such as virtual currency, equipment, character skins, etc. This can not only enhance the player's gaming experience, but also encourage players to participate more in the game, and improve the player's activity and retention rate.

[0035] Among them, marble physics simulation lottery is a common method in user interface lottery. It is presented in a designated area with some prizes. Marbles are shot into the lottery area at a certain speed. After a series of collisions, the speed of the marbles decreases and stops on a prize.

[0036] In one embodiment of the present application, the collision simulation method of a virtual moving object can be run on a local terminal device or a server. When the collision simulation method of a virtual moving object 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.

[0037] In an optional embodiment, 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 running body of the game program and the game screen presentation body are separated. The storage and operation of the collision simulation method of the virtual motion object 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.

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

[0039] In a possible implementation, an embodiment of the present invention provides a collision simulation method for a virtual moving object, providing 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.

[0040] Figure 1 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 1 The execution subject of this embodiment may be an electronic device.

[0041] like Figure 1 As shown, the method may include:

[0042] S101, acquiring attribute parameters of a virtual moving object, attribute parameters of an arc-shaped collision area, and motion parameters of the virtual moving object.

[0043] The attribute parameters of the virtual motion object include: the starting point of the virtual motion object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area.

[0044] Among them, the starting point of the virtual moving object is located outside the arc collision area, the arc collision area can be a circular area, an elliptical area or other area with an arc edge, the reference point in the arc collision area can be any point in the arc collision area, such as the center point, if the arc collision area is a circular area, then the reference point can be the center of the circle, the target collision number is the number of collisions of the virtual moving object in the arc collision area, and the stopping point in the arc collision area is the point where the virtual moving object stops in the arc collision area after being shot from the starting point to the arc collision area and colliding with the arc edge of the arc collision area and reflecting the target collision number.

[0045] It is worth noting that the attribute parameters of the virtual moving object, the attribute parameters of the arc-shaped collision area, and the motion parameters of the virtual moving object can be preset according to actual needs.

[0046] In the game lottery scene, the arc-shaped collision area can be a lottery restriction area. There are multiple reward positions in the lottery restriction area. Different reward positions correspond to different rewards. The virtual moving object can be, for example, a round marble. When the round marble is shot at a high speed from a certain direction toward the lottery restriction area, it will pass through multiple collisions, rebounds and speed attenuation on the arc edge of the lottery restriction area, and finally stop at a certain reward position. Then, the player's lottery reward is determined to be the reward corresponding to the reward position.

[0047] It is worth noting that the stopping point in the lottery restriction area can be determined based on the player's game level, game equipment owned, or randomly, and this embodiment does not specifically limit this.

[0048] For example, the virtual moving object is a marble and the arc collision area is the lottery restriction area. Figure 2 Schematic diagram of a graphical user interface provided in an embodiment of the present application Figure 1 ,like Figure 2 As shown, there are 4 lottery positions in the arc collision area, namely X1, X2, X3, and X4. The stopping point in the arc collision area is X4. After the marble passes the starting point and is shot from the entrance of the arc collision area to the arc collision area, it stops at X4 after collision and reflection by the arc edge of the arc collision area. Then, the reward corresponding to X4 is determined to be the player's lottery reward.

[0049] S102: performing collision simulation on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the target collision number and the stop point, and obtaining a plurality of intersection points between the virtual moving object and the arc-shaped edge of the arc-shaped collision area.

[0050] The position of the arc-shaped collision area can be determined according to the reference point. After the virtual moving object is launched from the starting point to the arc-shaped collision area, it stops at a stop point in the arc-shaped collision area after colliding with the arc-shaped edge of the arc-shaped collision area for a target number of collisions, so as to perform a collision simulation on the virtual moving object in the arc-shaped collision area, and obtain multiple intersection points between the virtual moving object and the arc-shaped edge of the arc-shaped collision area, wherein the number of the multiple intersection points is consistent with the target number of collisions, that is, each time the virtual moving object collides with the arc-shaped edge, an intersection point is generated.

[0051] The arc edge here refers to the arc edge within the arc collision area.

[0052] S103 , generating a collision simulation path of the virtual moving object according to the starting point, the multiple intersection points and the stopping point, so as to control the virtual moving object to move from the starting point to the stopping point.

[0053] The starting point, multiple intersection points and the stopping point are connected in sequence to generate a collision simulation path of the virtual moving object, so as to control the virtual moving object to move from the starting point to the stopping point through the multiple intersection points based on the collision simulation path, wherein the movement path of the virtual moving object from the starting point to the stopping point is the collision simulation path.

[0054] It is worth noting that the point mentioned in this embodiment refers to the position of the point (x, y). For example, obtaining the starting point of the virtual motion object refers to obtaining the position of the starting point of the virtual motion object. For example, determining the intersection refers to determining the position of the intersection.

[0055] In this embodiment, on the premise of determining the stopping point, by simplifying various physical simulation coefficients, the launch, rebound and stopping point of the virtual moving object are simulated on the user interface, thereby simulating the process of physical collision simulation in the arc plane area, and the experience is more realistic. For the game lottery scene, on the premise of ensuring the final lottery result, the physical collision lottery process is simulated to a certain extent, allowing players to feel a real experience.

[0056] Figure 3 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 2In an optional embodiment, the target collision number includes: a first collision number and a second collision number, wherein the first collision number is the number of collisions between the virtual moving object and the arc edge of the arc collision area after the virtual moving object is shot from the starting point to the arc collision area, and the second collision number is the number of collisions between the virtual moving object and the arc edge of the arc collision area after the virtual moving object is shot from the stopping point to the arc collision area.

[0057] like Figure 3 As shown, the above step S102, based on the starting point, the reference point, the target collision number and the stop point, performs collision simulation on the virtual moving object in the arc collision area to obtain multiple intersection points of the virtual moving object and the arc edge of the arc collision area, may include:

[0058] S201. Perform a forward collision simulation on a virtual moving object in an arc-shaped collision area according to a starting point, a reference point, and a first collision number, to obtain a plurality of forward intersection points between the virtual moving object and the arc-shaped edge.

[0059] The forward intersection point is an intersection point obtained by shooting the virtual moving object from the starting point to the arc-shaped collision area and then performing a first number of collisions with the arc-shaped edge of the arc-shaped collision area.

[0060] The position of the arc-shaped collision area can be determined according to the reference point. The forward collision simulation of the virtual moving object in the arc-shaped collision area can be understood as launching the virtual moving object from the starting point to the arc-shaped collision area, and then colliding with the arc-shaped edge of the arc-shaped collision area a first number of times to obtain the intersection of the virtual moving object and the arc-shaped edge, and taking the intersection as the forward intersection, wherein the number of the multiple forward intersections is consistent with the first number of collisions.

[0061] S202: Perform reverse collision simulation on the virtual moving object in the arc-shaped collision area according to the stop point, the reference point and the second collision number, and obtain multiple reverse intersection points between the virtual moving object and the arc-shaped edge.

[0062] The reverse intersection point is an intersection point obtained by shooting the virtual moving object from the stop point to the arc-shaped collision area and then performing a first number of collisions with the arc edge of the arc-shaped collision area.

[0063] The position of the arc-shaped collision area can be determined according to the reference point. The reverse collision simulation of the virtual moving object in the arc-shaped collision area can be understood as launching the virtual moving object from the stopping point to the arc-shaped collision area, and then colliding with the arc-shaped edge of the arc-shaped collision area a second time to obtain the intersection of the virtual moving object and the arc-shaped edge, and taking the intersection as the reverse intersection, wherein the number of multiple reverse intersections is consistent with the second collision number.

[0064] The multiple intersection points between the virtual moving object and the arc edge of the arc collision area include: multiple positive intersection points and multiple negative intersection points.

[0065] In this embodiment, the forward intersection point and the reverse intersection point are obtained through the forward collision simulation and the reverse collision simulation, so as to facilitate the subsequent generation of the forward collision path and the reverse collision path respectively, so as to obtain a complete collision simulation path of the virtual moving object.

[0066] Figure 4 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 3 In an optional embodiment, the attribute parameters of the virtual motion object further include: a first size, a first incident angle, and a second incident angle of the virtual motion object, and the attribute parameters of the arc collision area further include: a second size of the arc collision area.

[0067] The first size is the size of the virtual moving object, for example, it may include the radius of the virtual moving object, the first incident angle is the angle between the first incident ray and the preset horizontal line when the virtual moving object is shot from the starting point into the arc-shaped collision area, Figure 5 Schematic diagram of a graphical user interface provided in an embodiment of the present application Figure 2 ,like Figure 5 As shown, the starting point is P, the first incident line is PA1, the preset horizontal line is EF, and the first incident angle is ∠A1PF.

[0068] The second incident angle is the angle between the second incident ray and the preset horizontal line when the virtual moving object is shot from the stop point into the arc-shaped collision area. Figure 6 Schematic diagram of a graphical user interface provided in an embodiment of the present application Figure 3 ,like Figure 6 As shown, the stopping point is Q, the second incident line is QA2, the preset horizontal line is EF, and the second incident angle is ∠A2QF.

[0069] It is worth noting that the first incident angle and the second incident angle may be preset, and the first incident angle and the second incident angle are values ​​between 0° and 360°.

[0070] The second size is the size of the arc-shaped collision area, and may include, for example, the radius of the arc-shaped collision area.

[0071] Understandably, Figure 5 , Figure 6 It is just a collision diagram, which illustrates two forward collisions and two reverse collisions. During the simulated collision process, the number of forward collisions is the first collision number, and the number of reverse collisions is the second collision number.

[0072] like Figure 4As shown, the above step S201, based on the starting point, the reference point and the first collision number, performs a forward collision simulation on the virtual moving object in the arc collision area to obtain multiple forward intersection points of the virtual moving object and the arc edge, which may include:

[0073] S301 , performing a forward collision simulation on a virtual moving object in an arc-shaped collision area according to a starting point, a reference point, a first collision number, a first size, a second size, and a first incident angle, to obtain a plurality of forward intersection points.

[0074] The position and range of the arc-shaped collision area can be determined according to the reference point and the second size. According to the starting point, the reference point, the first number of collisions, the first size, the second size and the first incident angle, the virtual moving object is shot from the starting point to the arc-shaped collision area based on the first incident angle, and then collides with the arc-shaped edge a first number of times to perform a forward collision simulation on the virtual moving object within the arc-shaped collision area, thereby obtaining multiple forward intersection points of the virtual moving object and the arc-shaped edge.

[0075] The above step S202, performing reverse collision simulation on the virtual moving object in the arc collision area according to the stop point, the reference point and the second collision number, to obtain multiple reverse intersection points of the virtual moving object and the arc edge, may include:

[0076] S302: Perform reverse collision simulation on the virtual moving object in the arc-shaped collision area according to the stop point, the reference point, the second collision number, the first size, the second size, and the second incident angle to obtain a plurality of reverse intersection points.

[0077] According to the first size and the second size, the movable radius of the virtual moving object in the arc collision area can be determined, and the movable radius is the difference between the second size and the first size. According to the reference point and the second size, the position and range of the arc collision area can be determined. According to the stop point, the reference point, the second number of collisions, the first size, the second size and the second incident angle, the virtual moving object is shot from the stop point to the arc collision area based on the second incident angle, and then collides with the arc edge a second number of times to perform a reverse collision simulation on the virtual moving object in the arc collision area, so as to obtain multiple reverse intersections between the virtual moving object and the arc edge.

[0078] In this embodiment, the size of the virtual moving object, the size of the arc-shaped collision area, the first incident angle and the second incident angle are further considered to perform forward collision simulation and reverse collision simulation to obtain forward intersection and reverse intersection, thereby improving the accuracy of the collision simulation and making the subsequently generated collision simulation path more accurate and more realistic.

[0079] Figure 7 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 4 ,like Figure 7 As shown, in an optional implementation, the above step S301, according to the starting point, the reference point, the first collision number, the first size, the second size and the first incident angle, performs a forward collision simulation on the virtual moving object in the arc-shaped collision area to obtain multiple forward intersection points, which may include:

[0080] S401 . Perform a forward collision simulation on a virtual moving object according to a starting point, a reference point, a second size, and a first incident angle to obtain a first forward intersection point between the virtual moving object and an arc edge.

[0081] The first positive intersection point is the intersection point between the virtual moving object and the arc edge that is farther from the starting point when the virtual moving object performs the first positive collision simulation. When the virtual moving object performs the first positive collision simulation, the virtual moving object and the arc collision area have two intersection points, and the intersection point that is farther from the starting point is determined to be the first positive intersection point.

[0082] The following describes the process of determining the position of the first positive intersection point in combination with specific position parameters and size parameters, where the starting point P is (beginX, beginY), the reference point is the center of the circle C (centerX, centerY), the second size is the radius of the arc collision area (oriRadius), and the first incident angle is theta1 (beginRotate). Determining the first incident angle also determines the current motion direction (dir) of the virtual motion object.

[0083] When the first forward collision simulation is performed on the virtual moving object, the movable radius r of the virtual moving object in the arc-shaped collision area is the radius of the arc-shaped collision area (oriRadius).

[0084] The first incident angle corresponds to the direction vector D = (cos(theta1), sin(theta1)) of the first incident ray, let M = PC, b = M×D, d = M[x]×M[x]+M[y]×M[y]-r×r, discr = b×bd, t1 = -b-sqrt(discr), t2 = -b+sqrt(discr).

[0085] Calculate t1 and t2 using the above formula. If t1>t2, set t=t1; if t1>t2, set t=t2. The position of the first positive intersection point IN1 is (P[x]+t×D[x],P[y]+t×D[y]), where P[x] represents the horizontal coordinate of P, i.e. beginX; P[y] represents the vertical coordinate of P, i.e. beginY; D[x] represents the horizontal coordinate of D, i.e. cos(theta1); and D[y] represents the vertical coordinate of D, i.e. sin(theta1).

[0086] S402: Determine a reflection angle of a first return ray corresponding to a first incident ray according to a first forward intersection point, a starting point, and a reference point.

[0087] The first return ray is the ray where the first positive intersection point and the second positive intersection point are located, the second positive intersection point is the point where the virtual moving object intersects with the arc edge after being bounced off the first positive intersection point, and the reflection angle of the first return ray is the angle between the first return ray and the preset horizontal line, see Figure 5 , the first forward intersection is A1, the second forward intersection is B1, the first return ray is the ray where A1 and B1 are located, and the reflection angle of the first return ray is ∠A1B1F. Among them, the intersection of the first incident ray and the arc edge is the current position curPos of the virtual moving object.

[0088] Let I = IN1-P, N = IN1-C, then the ray vector of the first return ray is R = (I[x]-2×(I×N)×N[x], I[y]-2×(I×N)×N[y]), calculate atan2(R[y], R[x]) and convert it to angle system to obtain the reflection angle of the first return ray.

[0089] S403. Perform a forward collision simulation on the virtual moving object according to the first forward intersection, the reflection angle of the first return ray, the reference point, the first size and the second size to obtain a second forward intersection between the virtual moving object and the arc edge, until the number of forward collision simulations reaches the first collision number, and take all forward intersections obtained when the first collision number is reached as multiple forward intersections.

[0090] The first size is a radius of the virtual moving object, the first collision number is reflectNum, and the plurality of positive intersection points include: a first positive intersection point.

[0091] The first positive intersection point is used as the starting point of the virtual moving object, the reflection angle of the first return ray is used as the first incident angle of the virtual moving object, and the difference between the second size and the first size is calculated as the movable radius of the virtual moving object in the arc collision zone, that is, zoneRadius=oriRadius-radius. The determination of the reflection angle of the first return ray also determines the new moving direction (newDir) of the virtual moving object.

[0092] According to the first forward intersection, the reflection angle of the first return ray, the reference point, and the movable radius, the above formula D = (cos(theta1), sin(theta1)) is used, let M = PC, b = M×D, d = M[x]×M[x]+M[y]×M[y]-r×r, discr = b×bd, t1 = -b-sqrt(discr), t2 = -b+sqrt(discr), and calculate the second forward intersection of the virtual moving object and the arc edge.

[0093] Then, referring to the above steps, determine the reflection angle of the return ray corresponding to the first return ray based on the second forward intersection, the first forward intersection and the reference point, repeat the process until the number of forward collision simulations reaches the first collision number, and take all the forward intersections obtained when the first collision number is reached as multiple forward intersections, wherein all the forward intersections obtained when the first collision number is reached include: the first forward intersection and the second forward intersection.

[0094] It is worth noting that the starting point and multiple forward intersection points constitute a key point list of the forward collision path (posList1), and the forward collision path (posList1) is generated by connecting the points in the key point list in sequence.

[0095] In this embodiment, based on the starting point, the reference point, the second size and the first incident angle, a first number of forward collision simulations are performed on the virtual moving object to obtain a first forward intersection point between the virtual moving object and the arc edge, and the process is iteratively performed until multiple forward intersection points are obtained. The accuracy of the forward intersection point is improved, making the collision simulation path of the virtual moving object more realistic.

[0096] Figure 8 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 5 ,like Figure 8 As shown, in an optional implementation, the above step S302 performs a reverse collision simulation on the virtual moving object in the arc-shaped collision area according to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle to obtain multiple reverse intersection points, including:

[0097] S501 . Perform reverse collision simulation on a virtual moving object according to a stop point, a reference point, a first size, a second size, and a second incident angle to obtain a first reverse intersection point between the virtual moving object and an arc edge.

[0098] The first reverse intersection point is the intersection point between the virtual moving object and the arc edge when the first reverse collision simulation is performed on the virtual moving object.

[0099] The following describes the process of determining the position of the first positive intersection point in combination with specific position parameters and size parameters, where the stop point Q is (targetX, targetY), the reference point is the center of the circle C (centerX, centerY), the first size is the radius of the virtual moving object (radius), the second size is the radius of the arc collision area (oriRadius), and the second incident angle is theta2 (targetRotate). Determining the second incident angle also determines the current moving direction (dir) of the virtual moving object.

[0100] When the virtual moving object is simulated for the first reverse collision, the stop point is used as the starting point of the virtual moving object, and the movable radius r of the virtual moving object in the arc collision area is the difference between the second size and the first size, that is, zoneRadius=oriRadius-radius.

[0101] The second incident angle corresponds to the direction vector D = (cos(theta2), sin(theta2)) of the second incident ray, let M = QC, b = M×D, d = M[x]×M[x]+M[y]×M[y]-r×r, discr = b×bd, t1 = -b-sqrt(discr), t2 = -b+sqrt(discr).

[0102] Calculate t1 and t2 using the above formula. If t1>t2, set t=t1; if t1>t2, set t=t2. The position of the first reverse intersection point IN2 is (Q[x]+t×D[x],Q[y]+t×D[y]), where Q[x] represents the horizontal coordinate of Q, i.e. beginX; Q[y] represents the vertical coordinate of Q, i.e. beginY; D[x] represents the horizontal coordinate of D, i.e. cos(theta2); and D[y] represents the vertical coordinate of D, i.e. sin(theta2).

[0103] S502: Determine a reflection angle of a second return ray corresponding to the second incident ray according to the first reverse intersection point, the stop point, and the reference point.

[0104] The second return ray is the ray where the first reverse intersection point and the second reverse intersection point are located. The second reverse intersection point is the point where the virtual moving object intersects with the arc edge after being bounced off the first reverse intersection point. The reflection angle of the second return ray is the angle between the second return ray and the preset horizontal line. Figure 6 , the first reverse intersection is A1, the second reverse intersection is B2, the second return ray is the ray where A2 and B2 are located, and the reflection angle of the second return ray is ∠A2B2F. Among them, the intersection of the second incident ray and the arc edge is the current position curPos of the virtual moving object.

[0105] Let I = IN2-Q, N = IN2-C, then the ray vector of the first return ray is R = (I[x]-2×(I×N)×N[x], I[y]-2×(I×N)×N[y]), calculate atan2(R[y], R[x]) and convert it to angle system to obtain the reflection angle of the second return ray.

[0106] S503. Perform a reverse collision simulation on the virtual moving object according to the first reverse intersection point, the reflection angle of the second return ray, the reference point, the first size and the second size to obtain a second reverse intersection point between the virtual moving object and the arc edge, until the number of reverse collision simulations reaches a second collision number, and take all reverse intersection points obtained when the second collision number is reached as multiple reverse intersection points.

[0107] The second collision number is forward_rebound, and the multiple reverse intersection points include: a first reverse intersection point.

[0108] The first reverse intersection point is used as the stop and start point of the virtual moving object, the reflection angle of the second return ray is used as the second incident angle of the virtual moving object, and the movable radius r is the difference between the second size and the first size. The reflection angle of the second return ray is determined, which means the current moving direction (newDir) of the virtual moving object is determined.

[0109] According to the first reverse intersection point, the reflection angle of the second return ray, the reference point, and the movable radius, the above formula D = (cos(theta2), sin(theta2)) is used, let M = PC, b = M×D, d = M[x]×M[x]+M[y]×M[y]-r×r, discr = b×bd, t1 = -b-sqrt(discr), t2 = -b+sqrt(discr), and calculate the second reverse intersection point of the virtual moving object and the arc edge.

[0110] Then, referring to the above steps, determine the reflection angle of the return ray corresponding to the second return ray based on the second reverse intersection point, the first reverse intersection point and the reference point, repeat the process until the number of reverse collision simulations reaches the second collision number, and take all reverse intersection points obtained when the second collision number is reached as multiple reverse intersection points, wherein all reverse intersection points obtained when the second collision number is reached include: the first reverse intersection point and the second reverse intersection point.

[0111] It is worth noting that the stop point and multiple reverse intersection points constitute the key point list of the reverse collision path (posList2), and the forward collision path (posList2) is generated by connecting the points in the key point list in sequence.

[0112] In this embodiment, based on the stop point, the reference point, the first size, the second size and the first incident angle, a reverse collision simulation is performed on the virtual moving object for the second number of collisions to obtain the first reverse intersection point of the virtual moving object and the arc edge, and the process is iteratively performed until multiple reverse intersection points are obtained. The accuracy of the reverse intersection point is improved, making the collision simulation path of the virtual moving object more realistic.

[0113] Fig. 9 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 6 ,like Fig. 9 As shown, in an optional implementation, the above step S103, generating a collision simulation path of the virtual moving object according to the starting point, the multiple intersection points and the stop point, may include:

[0114] S601: Generate a forward collision path of a virtual moving object according to a starting point and a plurality of forward intersection points.

[0115] The starting point and multiple forward intersection points are connected in sequence to generate a forward collision path of the virtual moving object, wherein the forward collision path refers to the path formed after the virtual moving object is shot from the starting point to the arc-shaped collision area and undergoes multiple reflections (collisions) with the arc-shaped edges in the arc-shaped collision area.

[0116] Among them, connecting the starting point and multiple positive intersection points in sequence can be understood as connecting the starting point P and the positive intersection point A1 obtained by the first collision, and connecting the positive intersection point A1 obtained by the first collision with the positive intersection point B1 obtained by the second collision, and connecting the positive intersection point B1 obtained by the second collision with the positive intersection point C1 obtained by the third collision, and so on, to obtain a positive collision path.

[0117] S602: Generate a reverse collision path of the virtual moving object according to the stop point and multiple reverse intersection points.

[0118] The stop point and multiple reverse intersection points are connected in sequence to generate a reverse collision path of the virtual moving object, wherein the reverse collision path refers to the path formed after the virtual moving object is shot from the stop point to the arc-shaped collision area and undergoes multiple reflections (collisions) with the arc-shaped edges in the arc-shaped collision area.

[0119] Among them, connecting the stopping point and multiple reverse intersection points in sequence can be understood as connecting the stopping point Q and the reverse intersection point A2 obtained by the first collision, and connecting the reverse intersection point A2 obtained by the first collision with the reverse intersection point B2 obtained by the second collision, and connecting the reverse intersection point B2 obtained by the second collision with the reverse intersection point C2 obtained by the third collision, and so on, to obtain the reverse collision path.

[0120] S603: Generate a collision simulation path according to the forward collision path and the reverse collision path.

[0121] In some embodiments, the end point of the forward collision path and the end point of the reverse collision path are connected to generate a collision simulation path, the starting point of the collision simulation path is the starting point, and the end point of the collision simulation path is the stopping point.

[0122] In an optional implementation, the above step S603, generating a collision simulation path according to the forward collision path and the reverse collision path, includes:

[0123] Sequentially reverse the stop point and multiple reverse intersection points in the reverse collision path to generate a reverse collision path;

[0124] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0125] Sequentially reversing the stop point and multiple reverse intersection points in the reverse collision path can be understood as taking the stop point as the end point of the reverse collision path, taking the last reverse intersection point among the multiple reverse intersection points as the starting point of the reverse collision path, and the other reverse intersection points are similar. For example, the stop point Q, the reverse intersection points A2, B2, C2, etc. are connected in sequence to generate a reverse collision path. After reversal, the reverse intersection points...C2, B2, A2, and the stop point Q are connected in sequence to generate a reverse collision path.

[0126] Then, a collision simulation path is generated according to the points on the forward collision path and the points on the reverse collision path, wherein the points on the forward collision path and the points on the reverse collision path are merged to obtain merged points, and the merged points are connected in sequence to generate the collision simulation path.

[0127] For example, the points on the forward collision path are P, A1, B1, C1..., and the points on the reverse collision path are...C2, B2, A2, Q. The merged points are P, A1, B1, C1...,...C2, B2, A2, Q. Then P, A1, B1, C1...,...C2, B2, A2, Q are connected in sequence to generate a collision simulation path. The starting point of the simulated collision path is M and the end point is N.

[0128] In some embodiments, in order to reduce the amount of data, based on preset filtering rules, the points on the forward collision path and the points on the reverse collision path are filtered, and the end point of the filtered forward collision path and the starting point of the filtered reverse collision path are connected, so that the points on the reverse collision path are reversed and spliced ​​on the forward collision path, thereby forming a collision simulation path of the virtual moving object.

[0129] In this embodiment, in order to ensure that the virtual moving object can eventually stop at the stopping point, the forward collision path is determined from the initial point, and the reverse collision path is determined from the stopping point. The forward collision path and the reverse collision path are combined to determine the complete collision simulation path of the virtual moving object.

[0130] Fig.10 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 7 ,like Fig.10 As shown, in an optional implementation, the motion parameters also include: a preset speed threshold and a speed control coefficient.

[0131] The preset speed threshold is the lowest speed end_speed before the virtual moving object stops, and the speed control coefficient is speed_arg.

[0132] After the above step S103, generating a collision simulation path of the virtual moving object according to the starting point, the plurality of intersection points and the stop point, the method may further include:

[0133] S701: In response to a collision motion triggering event for a virtual motion object, the virtual motion object is set at a starting point.

[0134] The collision motion trigger event is a collision motion trigger event for a virtual motion object input by the player through the user interface. For example, the player clicks on a “lottery control” in the user interface to trigger the collision motion trigger event.

[0135] In response to the collision motion triggering event, the virtual motion object is rendered according to the starting point to set the virtual motion object at the starting point.

[0136] S702: Determine the current speed of the virtual moving object according to the target distance of the collision simulation path, a preset speed threshold, and a speed control coefficient.

[0137] According to the positions of the starting point, multiple intersection points and the stop point, the sum of the Euclidean distances between two adjacent points is calculated as the target distance of the collision simulation path.

[0138] According to the target distance, the preset speed threshold and the speed control coefficient, the current speed of the virtual moving object is calculated. The current speed is:

[0139] speed=sqrt(end_speed×end_speed-2×speed_arg×distance)

[0140] In some embodiments, the vector of the current movement direction of the virtual movement is curMoveDir = posList[2] - posList[1], where posList[1] is the starting point, posList[2] is the next point of the starting point among multiple intersections, the index of the starting point (current index curIndex) is 1, and the index of the next point is 2.

[0141] S703: Determine the target moving position of the virtual moving object according to the increment time of the current picture frame and the current speed.

[0142] The delta time (delta_time) of the current picture frame is a preset time duration from the previous picture frame to the current picture frame.

[0143] The moving distance (lateral moving distance and longitudinal moving distance) of the virtual moving object is determined according to the increment time of the current picture frame and the current speed, and the target moving position is determined according to the starting point and the moving distance.

[0144] Among them, the lateral moving distance is xDis = speed × delta_time × curMoveDir[x], the longitudinal moving distance is yDis = speed × delta_time × curMoveDir[y], curMoveDir[x] is the horizontal coordinate of the vector curMoveDir in the current movement direction, and curMoveDir[y] is the vertical coordinate of the vector curMoveDir in the current movement direction. Then the position of the target moving position is tPos = (curPos[x] + xDis, curPos[y] + yDis), among which curPos[x] is the horizontal coordinate of the starting point, and curPos[y] is the vertical coordinate of the starting point.

[0145] S704: Update the position of the virtual moving object in the current picture frame according to the target moving position, until the virtual moving object moves to the stop point.

[0146] According to the target moving position, the position of the virtual moving object in the current frame is updated, and according to the incremental time of the next frame of the current frame and the current speed, the moving point of the virtual moving object in the next frame is determined, and the position of the virtual moving object in the next frame is updated accordingly. The process is repeated until the virtual moving object moves to the stopping point.

[0147] In an optional implementation, the above step S704, updating the position of the virtual moving object in the current picture frame according to the target moving position until the virtual moving object moves to the stop point, may include:

[0148] If the target moving position is on the path segment between the starting point and the first target point, the virtual moving object is moved to the target moving position in the current picture frame, and the first target point is a point next to the starting point among the multiple intersection points and stop points.

[0149] The path segment between the starting point and the first target point is a line segment between the starting point and the first target point on the collision simulation path.

[0150] posList[1] is the starting point, and the first target point is posList[2]. It is determined whether the target moving position is on the path segment formed by posList[1] and posList[2]. If so, the virtual moving object is moved to the target moving position in the current picture frame to update the position of the virtual moving object.

[0151] That is to say, in the iterative process, after determining the moving point of the virtual moving object in each picture frame, it is necessary to determine whether the moving point is on the path segment composed of posList[curIndex] and posList[curIndex+1]. If so, the moving point is used to update the position of the virtual moving object in each picture frame to move the virtual moving object to the corresponding moving point in each picture frame. For example, if the moving position in the next picture frame is on the path segment between the first target point and the next point of the first target point, the position of the virtual moving object in the next picture frame is updated based on the moving position of the next picture frame, wherein the next point is the next point of the first target point among multiple intersection points and stop points.

[0152] It is worth noting that if the virtual moving object moves to a path segment between a stop point and a point immediately before the stop point, the virtual moving object can be directly controlled to move to the stop point in the next picture frame.

[0153] In an optional implementation, the above step S704, updating the position of the virtual moving object in the current picture frame according to the target moving position, may include:

[0154] If the target moving position is not on the path segment, a second target point is determined from the multiple intersection points, and the second target point is the next point of the first target point;

[0155] The virtual moving object is moved to a second target point in the current picture frame.

[0156] If the target moving position is not on the path segment between the starting point and the first target point, it means that the virtual moving object has currently completed the path segment between the starting point posList[1] and the first target point posList[2]. Then, the next point of the first target point is determined from multiple intersection points and stop points as the second target point, and the virtual moving object is moved to the second target point in the current picture frame.

[0157] It is worth noting that during the iteration process, if the moving position is not on the corresponding path segment, the index curIndex of the current point is incremented by 1, and it is determined whether the index after incrementing by 1 exceeds the index range of the points on the collision simulation path. The index range is [1]-[X], where 1 is the index of the starting point and X is the index of the stop point. If the index after incrementing by 1 exceeds X, it means that the collision simulation path has been completed and the simulation journey is over, that is, the virtual moving object is controlled to move to the stop point in the next frame. The index is an integer from 1 to X.

[0158] If it does not exceed N, it is determined that the virtual moving object moves to posList[curIndex] in the current frame, where posList[curIndex] is the point corresponding to the index after adding 1, and the vector of the current moving direction is curMoveDir = posList[curIndex+1]-posList[curIndex], where posList[curIndex+1] is the point corresponding to the index after adding 2.

[0159] In this embodiment, based on the collision simulation path, the target moving position of the virtual moving object is determined in different picture frames, and the movement of the virtual moving object is controlled until it moves to the stopping point, so that the motion trajectory of the virtual moving object along the collision simulation path can be rendered in the interface, providing a more realistic experience.

[0160] Fig.11 Schematic diagram of the process of the collision simulation method of the virtual moving object provided in the embodiment of the present application Figure 8 ,like Fig.11 As shown, in an optional implementation, the motion parameters further include: a plurality of motion speeds and an acceleration corresponding to each motion speed.

[0161] Among them, multiple movement speeds and the acceleration corresponding to each movement speed are included in the acceleration segment list delay_speed, and delay_speed contains multiple (speed, acc_speed), which means that acc_speed is used as the acceleration when the movement speed reaches speed.

[0162] The above step S703, determining the target moving position of the virtual moving object according to the increment time of the current picture frame and the current speed, may include:

[0163] S801: If the current speed does not exceed a preset speed threshold, determine the target moving position according to the increment time of the current picture frame and the preset speed threshold.

[0164] Determine whether the current speed (speed) exceeds the preset speed threshold (end_speed). If the current speed is less than or equal to the preset speed threshold, it is determined that the current speed does not exceed the preset speed threshold. Then, the preset speed threshold is used as the current speed. The calculation formula in the above step S703 is used, and the preset speed threshold is substituted as speed into the formula to determine the target moving position.

[0165] S802: If the current speed exceeds the preset speed threshold, the current speed is re-determined according to the acceleration corresponding to the current speed, the current speed and the incremental time, and the target moving position is determined according to the incremental time and the re-determined current speed.

[0166] If the current speed exceeds the preset speed threshold, the query determines the acceleration corresponding to the current speed, and redetermines the current speed based on the acceleration corresponding to the current speed, the current speed, and the delta time. The redetermined current speed is: -speed×delay_speed×delta_time.

[0167] Among them, speed is the current speed, delay_speed is the acceleration corresponding to the current speed, and delta_time is the incremental time.

[0168] Then, the target moving position is determined according to the incremental time and the re-determined current speed, that is, the calculation formula in the above step S703 is used, and the re-determined current speed is substituted into the formula as speed to determine the target moving position.

[0169] In this embodiment, a multi-layer acceleration method is used to adjust the speed change of the virtual moving object, that is, in different speed areas, the speed attenuation acceleration of the virtual moving object is also different, so that the visual attenuation change of the virtual moving object at different speeds can be controlled, thereby achieving a better visual rhythm effect.

[0170] Fig.12 This is a schematic structural diagram of a collision simulation device for a virtual moving object provided in an embodiment of the present application. The device can be integrated into an electronic device.

[0171] like Fig.12 As shown, the device may include:

[0172] The acquisition module 901 is used to acquire the attribute parameters of the virtual motion object, the attribute parameters of the arc collision area and the motion parameters of the virtual motion object; the attribute parameters of the virtual motion object include: the starting point of the virtual motion object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area;

[0173] The processing module 902 is used to perform a collision simulation on the virtual moving object in the arc collision area according to the starting point, the reference point, the target collision number and the stop point, and obtain a plurality of intersection points of the virtual moving object and the arc edge of the arc collision area;

[0174] The generation module 903 is used to generate a collision simulation path of the virtual moving object according to the starting point, multiple intersection points and the stopping point, so as to control the virtual moving object to move from the starting point to the stopping point.

[0175] In an optional implementation, the target collision number includes: a first collision number, a second collision number;

[0176] The processing module 902 is specifically used for:

[0177] According to the starting point, the reference point and the first collision number, a forward collision simulation is performed on the virtual moving object in the arc collision area to obtain a plurality of forward intersection points between the virtual moving object and the arc edge;

[0178] According to the stop point, the reference point and the second collision number, a reverse collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple reverse intersections of the virtual moving object and the arc edge; the multiple intersections include: multiple forward intersections and multiple reverse intersections.

[0179] In an optional embodiment, the attribute parameters of the virtual moving object further include: a first size, a first incident angle, and a second incident angle of the virtual moving object, and the attribute parameters of the arc collision area further include: a second size of the arc collision area; wherein the first incident angle is an angle between a first incident ray and a preset horizontal line when the virtual moving object is shot from a starting point into the arc collision area, and the second incident angle is an angle between a second incident ray and a preset horizontal line when the virtual moving object is shot from a stopping point into the arc collision area;

[0180] The processing module 902 is specifically configured to:

[0181] According to the starting point, the reference point, the first collision number, the first size, the second size and the first incident angle, a forward collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of forward intersection points;

[0182] According to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle, a reverse collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of reverse intersection points.

[0183] In an optional implementation, the processing module 902 is specifically configured to:

[0184] Performing a forward collision simulation on the virtual moving object according to the starting point, the reference point, the second size, and the first incident angle to obtain a first forward intersection point between the virtual moving object and the arc edge;

[0185] Determine a reflection angle of a first return ray corresponding to the first incident ray according to the first forward intersection point, the starting point and the reference point;

[0186] According to the first forward intersection, the reflection angle of the first return ray, the reference point, the first size and the second size, a forward collision simulation is performed on the virtual moving object to obtain a second forward intersection between the virtual moving object and the arc edge, until the number of forward collision simulations reaches the first collision number, and all forward intersections obtained when the first collision number is reached are taken as multiple forward intersections.

[0187] In an optional implementation, the processing module 902 is specifically configured to:

[0188] Performing a reverse collision simulation on the virtual moving object according to the stop point, the reference point, the first size, the second size, and the second incident angle to obtain a first reverse intersection point between the virtual moving object and the arc edge;

[0189] Determine a reflection angle of a second return ray corresponding to the second incident ray according to the first reverse intersection point, the stop point and the reference point;

[0190] According to the first reverse intersection point, the reflection angle of the second return ray, the reference point, the first size and the second size, a reverse collision simulation is performed on the virtual moving object to obtain the second reverse intersection point of the virtual moving object and the arc edge, until the number of reverse collision simulations reaches the second collision number, and all reverse intersection points obtained when the second collision number is reached are taken as multiple reverse intersection points.

[0191] In an optional implementation, the generating module 903 is specifically configured to:

[0192] Generate a forward collision path of the virtual moving object according to the starting point and the plurality of forward intersection points;

[0193] generating a reverse collision path of the virtual moving object according to the stop point and the plurality of reverse intersection points;

[0194] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0195] In an optional implementation, the generating module 903 is specifically configured to:

[0196] Sequentially reverse the stop point and multiple reverse intersection points in the reverse collision path to generate a reverse collision path;

[0197] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0198] In an optional implementation, the motion parameters further include: a preset speed threshold and a speed control coefficient; the processing module 902 is further configured to:

[0199] In response to a collision motion trigger event for the virtual motion object, the virtual motion object is set at a starting point;

[0200] Determine the current speed of the virtual moving object according to the target distance of the collision simulation path, the preset speed threshold and the speed control coefficient;

[0201] Determine the target moving position of the virtual moving object according to the increment time of the current picture frame and the current speed;

[0202] According to the target moving position, the position of the virtual moving object in the current picture frame is updated until the virtual moving object moves to the stop point.

[0203] In an optional implementation, the processing module 902 is specifically configured to:

[0204] If the target moving position is on the path segment between the starting point and the first target point, the virtual moving object is moved to the target moving position in the current picture frame, and the first target point is a point next to the starting point among the multiple intersection points and stop points.

[0205] In an optional implementation, the processing module 902 is specifically configured to:

[0206] If the target moving position is not on the path segment, a second target point is determined from the multiple intersection points, and the second target point is the next point of the first target point;

[0207] The virtual moving object is moved to a second target point in the current picture frame.

[0208] In an optional implementation, the motion parameter further includes: a plurality of motion speeds and accelerations corresponding to the motion speeds; the processing module 902 is specifically configured to:

[0209] If the current speed does not exceed the preset speed threshold, the target moving position is determined according to the increment time of the current picture frame and the preset speed threshold;

[0210] If the current speed exceeds the preset speed threshold, the current speed is re-determined according to the acceleration corresponding to the current speed, the current speed and the incremental time, and the target moving position is determined according to the incremental time and the re-determined current speed.

[0211] In this embodiment, the acquisition module is used to obtain the attribute parameters of the virtual motion object, the attribute parameters of the arc collision area, and the motion parameters of the virtual motion object; the attribute parameters of the virtual motion object include: the starting point of the virtual motion object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, the motion parameters include: the number of target collisions and the stop point in the arc collision area, the processing module is used to simulate the collision of the virtual motion object in the arc collision area according to the starting point, the reference point, the number of target collisions and the stop point, and obtain multiple intersections of the arc edge of the virtual motion object and the arc collision area, and the generation module is used to generate the collision simulation path of the virtual motion object according to the starting point, multiple intersections and the stop point, so as to control the virtual motion object to move from the starting point to the stop point. Thus, under the premise of determining the stop point, the process of physical collision simulation in the arc plane area is simulated, and the experience is more realistic.

[0212] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.13 As shown, the device may include: a processor 1001, a memory 1002 and a bus 1003, the memory 1002 stores machine-readable instructions executable by the processor 1001, when the electronic device is running, the processor 1001 communicates with the memory 1002 through the bus 1003, and the processor 1001 executes the machine-readable instructions to perform the following steps:

[0213] Acquire attribute parameters of the virtual motion object, attribute parameters of the arc collision area, and motion parameters of the virtual motion object; the attribute parameters of the virtual motion object include: a starting point of the virtual motion object, the attribute parameters of the arc collision area include: a reference point within the arc collision area, and the motion parameters include: a target collision number and a stop point within the arc collision area;

[0214] According to the starting point, the reference point, the target collision number and the stop point, a collision simulation is performed on the virtual moving object in the arc collision area to obtain a plurality of intersection points of the virtual moving object and the arc edge of the arc collision area;

[0215] A collision simulation path of the virtual moving object is generated according to the starting point, the multiple intersection points and the stopping point to control the virtual moving object to move from the starting point to the stopping point.

[0216] In an optional implementation, the target collision number includes: a first collision number, a second collision number;

[0217] According to the starting point, the reference point, the target collision number and the stop point, a collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple intersection points of the virtual moving object and the arc edge of the arc collision area, including:

[0218] According to the starting point, the reference point and the first collision number, a forward collision simulation is performed on the virtual moving object in the arc collision area to obtain a plurality of forward intersection points between the virtual moving object and the arc edge;

[0219] According to the stop point, the reference point and the second collision number, a reverse collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple reverse intersections of the virtual moving object and the arc edge; the multiple intersections include: multiple forward intersections and multiple reverse intersections.

[0220] In an optional embodiment, the attribute parameters of the virtual moving object further include: a first size, a first incident angle, and a second incident angle of the virtual moving object, and the attribute parameters of the arc collision area further include: a second size of the arc collision area; wherein the first incident angle is an angle between a first incident ray and a preset horizontal line when the virtual moving object is shot from a starting point into the arc collision area, and the second incident angle is an angle between a second incident ray and a preset horizontal line when the virtual moving object is shot from a stopping point into the arc collision area;

[0221] According to the starting point, the reference point and the first collision number, a forward collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple forward intersection points of the virtual moving object and the arc edge, including:

[0222] According to the starting point, the reference point, the first collision number, the first size, the second size and the first incident angle, a forward collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of forward intersection points;

[0223] According to the stop point, the reference point and the second collision number, a reverse collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple reverse intersection points of the virtual moving object and the arc edge, including:

[0224] According to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle, a reverse collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of reverse intersection points.

[0225] In an optional implementation, a forward collision simulation is performed on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the first collision number, the first size, the second size, and the first incident angle to obtain a plurality of forward intersection points, including:

[0226] Performing a forward collision simulation on the virtual moving object according to the starting point, the reference point, the second size, and the first incident angle to obtain a first forward intersection point between the virtual moving object and the arc edge;

[0227] Determine a reflection angle of a first return ray corresponding to the first incident ray according to the first forward intersection point, the starting point and the reference point;

[0228] According to the first forward intersection, the reflection angle of the first return ray, the reference point, the first size and the second size, a forward collision simulation is performed on the virtual moving object to obtain a second forward intersection between the virtual moving object and the arc edge, until the number of forward collision simulations reaches the first collision number, and all forward intersections obtained when the first collision number is reached are taken as multiple forward intersections.

[0229] In an optional implementation, according to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle, a reverse collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of reverse intersection points, including:

[0230] Performing a reverse collision simulation on the virtual moving object according to the stop point, the reference point, the first size, the second size, and the second incident angle to obtain a first reverse intersection point between the virtual moving object and the arc edge;

[0231] Determine a reflection angle of a second return ray corresponding to the second incident ray according to the first reverse intersection point, the stop point and the reference point;

[0232] According to the first reverse intersection point, the reflection angle of the second return ray, the reference point, the first size and the second size, a reverse collision simulation is performed on the virtual moving object to obtain the second reverse intersection point of the virtual moving object and the arc edge, until the number of reverse collision simulations reaches the second collision number, and all reverse intersection points obtained when the second collision number is reached are taken as multiple reverse intersection points.

[0233] In an optional implementation, generating a collision simulation path of a virtual moving object according to a starting point, a plurality of intersection points, and a stop point includes:

[0234] Generate a forward collision path of the virtual moving object according to the starting point and the plurality of forward intersection points;

[0235] generating a reverse collision path of the virtual moving object according to the stop point and the plurality of reverse intersection points;

[0236] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0237] In an optional implementation, generating a collision simulation path according to the forward collision path and the reverse collision path includes:

[0238] Sequentially reverse the stop point and multiple reverse intersection points in the reverse collision path to generate a reverse collision path;

[0239] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0240] In an optional embodiment, the motion parameters further include: a preset speed threshold and a speed control coefficient; after generating a collision simulation path of the virtual motion object according to the starting point, the plurality of intersection points and the stop point, the method further includes:

[0241] In response to a collision motion trigger event for the virtual motion object, the virtual motion object is set at a starting point;

[0242] Determine the current speed of the virtual moving object according to the target distance of the collision simulation path, the preset speed threshold and the speed control coefficient;

[0243] Determine the target moving position of the virtual moving object according to the increment time of the current picture frame and the current speed;

[0244] According to the target moving position, the position of the virtual moving object in the current picture frame is updated until the virtual moving object moves to the stop point.

[0245] In an optional implementation, updating the position of the virtual moving object in the current picture frame according to the target moving position includes:

[0246] If the target moving position is on the path segment between the starting point and the first target point, the virtual moving object is moved to the target moving position in the current picture frame, and the first target point is a point next to the starting point among the multiple intersection points and stop points.

[0247] In an optional implementation, updating the position of the virtual moving object in the current picture frame according to the target moving position includes:

[0248] If the target moving position is not on the path segment, a second target point is determined from the multiple intersection points, and the second target point is the next point of the first target point;

[0249] The virtual moving object is moved to a second target point in the current picture frame.

[0250] In an optional embodiment, the motion parameters further include: a plurality of motion speeds and accelerations corresponding to the motion speeds; determining the target moving position of the virtual motion object according to the increment time of the current picture frame and the current speed, including:

[0251] If the current speed does not exceed the preset speed threshold, the target moving position is determined according to the increment time of the current picture frame and the preset speed threshold;

[0252] If the current speed exceeds the preset speed threshold, the current speed is re-determined according to the acceleration corresponding to the current speed, the current speed and the incremental time, and the target moving position is determined according to the incremental time and the re-determined current speed.

[0253] In this embodiment, the processor executes machine-readable instructions to obtain attribute parameters of the virtual motion object, attribute parameters of the arc collision area, and motion parameters of the virtual motion object. The attribute parameters of the virtual motion object include: the starting point of the virtual motion object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area. According to the starting point, the reference point, the number of target collisions, and the stop point, the virtual motion object is subjected to collision simulation in the arc collision area to obtain multiple intersection points of the arc edge of the virtual motion object and the arc collision area, and the collision simulation path of the virtual motion object is generated according to the starting point, the multiple intersection points, and the stop point. Therefore, under the premise of determining the stop point, the process of physical collision simulation in the arc plane area is simulated, and the experience is more realistic.

[0254] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the following steps:

[0255] Acquire attribute parameters of the virtual motion object, attribute parameters of the arc collision area, and motion parameters of the virtual motion object; the attribute parameters of the virtual motion object include: a starting point of the virtual motion object, the attribute parameters of the arc collision area include: a reference point within the arc collision area, and the motion parameters include: a target collision number and a stop point within the arc collision area;

[0256] According to the starting point, the reference point, the target collision number and the stop point, a collision simulation is performed on the virtual moving object in the arc collision area to obtain a plurality of intersection points of the virtual moving object and the arc edge of the arc collision area;

[0257] A collision simulation path of the virtual moving object is generated according to the starting point, the multiple intersection points and the stopping point to control the virtual moving object to move from the starting point to the stopping point.

[0258] In an optional implementation, the target collision number includes: a first collision number, a second collision number;

[0259] According to the starting point, the reference point, the target collision number and the stop point, a collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple intersection points of the virtual moving object and the arc edge of the arc collision area, including:

[0260] According to the starting point, the reference point and the first collision number, a forward collision simulation is performed on the virtual moving object in the arc collision area to obtain a plurality of forward intersection points between the virtual moving object and the arc edge;

[0261] According to the stop point, the reference point and the second collision number, a reverse collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple reverse intersections of the virtual moving object and the arc edge; the multiple intersections include: multiple forward intersections and multiple reverse intersections.

[0262] In an optional embodiment, the attribute parameters of the virtual moving object further include: a first size, a first incident angle, and a second incident angle of the virtual moving object, and the attribute parameters of the arc collision area further include: a second size of the arc collision area; wherein the first incident angle is an angle between a first incident ray and a preset horizontal line when the virtual moving object is shot from a starting point into the arc collision area, and the second incident angle is an angle between a second incident ray and a preset horizontal line when the virtual moving object is shot from a stopping point into the arc collision area;

[0263] According to the starting point, the reference point and the first collision number, a forward collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple forward intersection points of the virtual moving object and the arc edge, including:

[0264] According to the starting point, the reference point, the first collision number, the first size, the second size and the first incident angle, a forward collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of forward intersection points;

[0265] According to the stop point, the reference point and the second collision number, a reverse collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple reverse intersection points of the virtual moving object and the arc edge, including:

[0266] According to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle, a reverse collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of reverse intersection points.

[0267] In an optional implementation, a forward collision simulation is performed on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the first collision number, the first size, the second size, and the first incident angle to obtain a plurality of forward intersection points, including:

[0268] Performing a forward collision simulation on the virtual moving object according to the starting point, the reference point, the second size, and the first incident angle to obtain a first forward intersection point between the virtual moving object and the arc edge;

[0269] Determine a reflection angle of a first return ray corresponding to the first incident ray according to the first forward intersection point, the starting point and the reference point;

[0270] According to the first forward intersection, the reflection angle of the first return ray, the reference point, the first size and the second size, a forward collision simulation is performed on the virtual moving object to obtain a second forward intersection between the virtual moving object and the arc edge, until the number of forward collision simulations reaches the first collision number, and all forward intersections obtained when the first collision number is reached are taken as multiple forward intersections.

[0271] In an optional implementation, according to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle, a reverse collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of reverse intersection points, including:

[0272] Performing a reverse collision simulation on the virtual moving object according to the stop point, the reference point, the first size, the second size, and the second incident angle to obtain a first reverse intersection point between the virtual moving object and the arc edge;

[0273] Determine a reflection angle of a second return ray corresponding to the second incident ray according to the first reverse intersection point, the stop point and the reference point;

[0274] According to the first reverse intersection point, the reflection angle of the second return ray, the reference point, the first size and the second size, a reverse collision simulation is performed on the virtual moving object to obtain the second reverse intersection point of the virtual moving object and the arc edge, until the number of reverse collision simulations reaches the second collision number, and all reverse intersection points obtained when the second collision number is reached are taken as multiple reverse intersection points.

[0275] In an optional implementation, generating a collision simulation path of a virtual moving object according to a starting point, a plurality of intersection points, and a stop point includes:

[0276] Generate a forward collision path of the virtual moving object according to the starting point and the plurality of forward intersection points;

[0277] generating a reverse collision path of the virtual moving object according to the stop point and the plurality of reverse intersection points;

[0278] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0279] In an optional implementation, generating a collision simulation path according to the forward collision path and the reverse collision path includes:

[0280] Sequentially reverse the stop point and multiple reverse intersection points in the reverse collision path to generate a reverse collision path;

[0281] A collision simulation path is generated according to the forward collision path and the reverse collision path.

[0282] In an optional embodiment, the motion parameters further include: a preset speed threshold and a speed control coefficient; after generating a collision simulation path of the virtual motion object according to the starting point, the plurality of intersection points and the stop point, the method further includes:

[0283] In response to a collision motion trigger event for the virtual motion object, the virtual motion object is set at a starting point;

[0284] Determine the current speed of the virtual moving object according to the target distance of the collision simulation path, the preset speed threshold and the speed control coefficient;

[0285] Determine the target moving position of the virtual moving object according to the increment time of the current picture frame and the current speed;

[0286] According to the target moving position, the position of the virtual moving object in the current picture frame is updated until the virtual moving object moves to the stop point.

[0287] In an optional implementation, updating the position of the virtual moving object in the current picture frame according to the target moving position includes:

[0288] If the target moving position is on the path segment between the starting point and the first target point, the virtual moving object is moved to the target moving position in the current picture frame, and the first target point is a point next to the starting point among the multiple intersection points and stop points.

[0289] In an optional implementation, updating the position of the virtual moving object in the current picture frame according to the target moving position includes:

[0290] If the target moving position is not on the path segment, a second target point is determined from the multiple intersection points, and the second target point is the next point of the first target point;

[0291] The virtual moving object is moved to a second target point in the current picture frame.

[0292] In an optional embodiment, the motion parameters further include: a plurality of motion speeds and accelerations corresponding to the motion speeds; determining the target moving position of the virtual motion object according to the increment time of the current picture frame and the current speed, including:

[0293] If the current speed does not exceed the preset speed threshold, the target moving position is determined according to the increment time of the current picture frame and the preset speed threshold;

[0294] If the current speed exceeds the preset speed threshold, the current speed is re-determined according to the acceleration corresponding to the current speed, the current speed and the incremental time, and the target moving position is determined according to the incremental time and the re-determined current speed.

[0295] In this embodiment, the computer program is executed by the processor to obtain the attribute parameters of the virtual moving object, the attribute parameters of the arc collision area, and the motion parameters of the virtual moving object. The attribute parameters of the virtual moving object include: the starting point of the virtual moving object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area. According to the starting point, the reference point, the number of target collisions, and the stop point, the virtual moving object is subjected to collision simulation in the arc collision area to obtain multiple intersections of the virtual moving object and the arc edge of the arc collision area. According to the starting point, the multiple intersections, and the stop point, the collision simulation path of the virtual moving object is generated. Therefore, under the premise of determining the stop point, the process of physical collision simulation in the arc plane area is simulated, and the experience is more realistic.

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

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

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

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

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

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

[0302] 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 simulating collision of a virtual moving object, characterized in that: include: Acquire attribute parameters of a virtual moving object, attribute parameters of an arc-shaped collision area, and motion parameters of the virtual moving object; The attribute parameters of the virtual motion object include: the starting point of the virtual motion object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area; According to the starting point, the reference point, the target collision number and the stop point, a collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain a plurality of intersection points of the virtual moving object and the arc-shaped edge of the arc-shaped collision area; A collision simulation path of the virtual moving object is generated according to the starting point, the multiple intersection points and the stopping point, so as to control the virtual moving object to move from the starting point to the stopping point.

2. The method according to claim 1, characterized in that The target collision times include: a first collision time and a second collision time; The step of performing collision simulation on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the target collision number, and the stop point to obtain a plurality of intersection points between the virtual moving object and the arc-shaped edge of the arc-shaped collision area includes: According to the starting point, the reference point and the first collision number, performing a forward collision simulation on the virtual moving object in the arc-shaped collision area to obtain a plurality of forward intersection points between the virtual moving object and the arc edge; According to the stop point, the reference point and the second collision number, a reverse collision simulation is performed on the virtual moving object in the arc collision area to obtain multiple reverse intersections of the virtual moving object and the arc edge; the multiple intersections include: the multiple forward intersections and the multiple reverse intersections.

3. The method according to claim 2, characterized in that The attribute parameters of the virtual moving object further include: a first size, a first incident angle, and a second incident angle of the virtual moving object, and the attribute parameters of the arc collision area further include: a second size of the arc collision area; wherein the first incident angle is the angle between a first incident ray when the virtual moving object is shot from the starting point into the arc collision area and a preset horizontal line, and the second incident angle is the angle between a second incident ray when the virtual moving object is shot from the stopping point into the arc collision area and the preset horizontal line; The step of performing a forward collision simulation on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point and the first collision number to obtain a plurality of forward intersection points between the virtual moving object and the arc edge includes: According to the starting point, the reference point, the first collision number, the first size, the second size, and the first incident angle, a forward collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain the multiple forward intersection points; The step of performing reverse collision simulation on the virtual moving object in the arc-shaped collision area according to the stop point, the reference point and the second collision number to obtain a plurality of reverse intersection points between the virtual moving object and the arc-shaped edge includes: According to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle, a reverse collision simulation is performed on the virtual moving object in the arc-shaped collision area to obtain the multiple reverse intersection points.

4. The method according to claim 3, characterized in that: The performing forward collision simulation on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the first collision number, the first size, the second size and the first incident angle to obtain the plurality of forward intersection points includes: Performing a forward collision simulation on the virtual moving object according to the starting point, the reference point, the second size, and the first incident angle to obtain a first forward intersection point between the virtual moving object and the arc edge; Determine, according to the first forward intersection point, the starting point and the reference point, a reflection angle of a first return ray corresponding to the first incident ray; According to the first forward intersection point, the reflection angle of the first return ray, the reference point, the first size and the second size, a forward collision simulation is performed on the virtual moving object to obtain a second forward intersection point between the virtual moving object and the arc edge, until the number of forward collision simulations reaches the first number of collisions, and all forward intersection points obtained when the first number of collisions is reached are used as the multiple forward intersection points.

5. The method according to claim 3, characterized in that: The performing reverse collision simulation on the virtual moving object in the arc-shaped collision area according to the stop point, the reference point, the second collision number, the first size, the second size and the second incident angle to obtain the multiple reverse intersection points includes: Performing a reverse collision simulation on the virtual moving object according to the stop point, the reference point, the first size, the second size, and the second incident angle to obtain a first reverse intersection point between the virtual moving object and the arc edge; Determining a reflection angle of a second return ray corresponding to the second incident ray according to the first reverse intersection point, the stop point, and the reference point; According to the first reverse intersection point, the reflection angle of the second return ray, the reference point, the first size and the second size, a reverse collision simulation is performed on the virtual moving object to obtain a second reverse intersection point between the virtual moving object and the arc edge, until the number of reverse collision simulations reaches the second collision number, and all reverse intersection points obtained when the second collision number is reached are used as the multiple reverse intersection points.

6. The method according to claim 2, characterized in that The step of generating a collision simulation path of the virtual moving object according to the starting point, the plurality of intersection points and the stopping point comprises: generating a forward collision path of the virtual moving object according to the starting point and the plurality of forward intersection points; generating a reverse collision path of the virtual moving object according to the stop point and the plurality of reverse intersection points; The collision simulation path is generated according to the forward collision path and the reverse collision path.

7. The method according to claim 6, characterized in that The step of generating the collision simulation path according to the forward collision path and the reverse collision path includes: Sequentially reversing the stop point and the plurality of reverse intersection points in the reverse collision path to generate a reverse collision path; The collision simulation path is generated according to the forward collision path and the reverse collision path.

8. The method according to claim 1, characterized in that The motion parameters further include: a preset speed threshold and a speed control coefficient; after generating a collision simulation path of the virtual motion object according to the starting point, the plurality of intersection points and the stop point, the method further includes: In response to a collision motion triggering event for the virtual motion object, setting the virtual motion object at the starting point; Determining the current speed of the virtual moving object according to the target distance of the collision simulation path, the preset speed threshold and the speed control coefficient; Determining a target moving position of the virtual moving object according to the increment time of the current picture frame and the current speed; According to the target moving position, the position of the virtual moving object in the current picture frame is updated until the virtual moving object moves to the stopping point.

9. The method according to claim 8, characterized in that The updating of the position of the virtual moving object in the current picture frame according to the target moving position includes: If the target moving position is on the path segment between the starting point and a first target point, the virtual moving object is moved to the target moving position in the current picture frame, and the first target point is a point next to the starting point among the multiple intersection points and stop points.

10. The method according to claim 9, characterized in that The updating of the position of the virtual moving object in the current picture frame according to the target moving position includes: If the target moving position is not on the path segment, determining a second target point from the multiple intersection points, the second target point being a point next to the first target point; The virtual moving object is moved to the second target point in the current picture frame.

11. The method according to claim 8, characterized in that The motion parameters also include: a plurality of motion speeds and accelerations corresponding to the motion speeds; determining the target moving position of the virtual motion object according to the increment time of the current picture frame and the current speed includes: If the current speed does not exceed the preset speed threshold, determining the target moving position according to the increment time of the current picture frame and the preset speed threshold; If the current speed exceeds the preset speed threshold, the current speed is re-determined according to the acceleration corresponding to the current speed, the current speed and the incremental time, and the target moving position is determined according to the incremental time and the re-determined current speed.

12. A collision simulation device for a virtual moving object, characterized in that: include: An acquisition module, used to acquire attribute parameters of a virtual motion object, attribute parameters of an arc-shaped collision area, and motion parameters of the virtual motion object; The attribute parameters of the virtual motion object include: the starting point of the virtual motion object, the attribute parameters of the arc collision area include: the reference point in the arc collision area, and the motion parameters include: the number of target collisions and the stop point in the arc collision area; a processing module, configured to perform a collision simulation on the virtual moving object in the arc-shaped collision area according to the starting point, the reference point, the target collision number and the stop point, so as to obtain a plurality of intersection points between the virtual moving object and the arc-shaped edge of the arc-shaped collision area; A generating module is used to generate a collision simulation path of the virtual moving object according to the starting point, the multiple intersection points and the stopping point, so as to control the virtual moving object to move from the starting point to the stopping point.

13. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1 to 11.

14. 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 method according to any one of claims 1 to 11 is executed.

Citation Information

Patent Citations

  • Method and device for avoiding obstacles by unmanned aerial vehicle, equipment and storage medium

    CN109407705A

  • Trajectory prompting method and device, storage medium and electronic device

    CN111249719A

  • Simulation device and information storage medium

    JP1999175747A