Virtual object path generation method and device, electronic equipment and storage medium

By obtaining obstacle information in the virtual scene, determining the target obstacle and setting an out-of-expanding area, the problem of virtual objects encountering obstacles on the shortest path is solved, effectively avoiding obstacles for virtual objects, and improving the visual effect of virtual scenes.

CN120053992APending Publication Date: 2025-05-30YIDIAN LINGXI INFORMATION TECHNOLOGY (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510193295.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In existing virtual scenes, virtual objects may encounter obstacles when moving on the shortest path, causing virtual objects to penetrate the mold and affect the visual effect.

Method used

By obtaining obstacle information in the virtual scene, a target obstacle intersects with the first moving path of the virtual object, and a expansion area is set around it, an obstacle avoidance point is determined, and the movement path of the virtual object is updated to bypass the obstacle.

Benefits of technology

Effectively avoid obstacles, reduce the situation of virtual objects passing through the mold, and improve the visual effect of virtual scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120053992A_ABST
    Figure CN120053992A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device of a virtual object, electronic equipment and a storage medium. The method comprises the steps that obstacle information in a virtual scene where the virtual object is located is acquired; wherein the obstacle information comprises position information of each obstacle; according to the obstacle information and a first moving path of the virtual object in the virtual scene, determining a target obstacle intersecting with the first moving path in the obstacles; setting an external expansion area surrounding the target obstacle according to the boundary position of the target obstacle; determining an obstacle avoidance point in the external expansion area based on a reference point set in the external expansion area; and updating the first moving path into a second moving path according to the obstacle avoidance point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data processing, and more particularly, to a method, apparatus, electronic device, and storage medium for generating a path of a virtual object. Background Art

[0002] With the rapid development of virtual scenes, they can be applied to fields such as games, education, architecture, or advertising promotion. In a virtual scene, various virtual characters and virtual buildings are set on a virtual terrain, thereby constructing a complex and diverse virtual scene. In existing virtual scenes, virtual objects often move along the shortest path in the virtual scene, but there may be obstacles on the shortest path, which causes the virtual objects to penetrate the model and affects the overall visual effect of the virtual scene. Summary of the Invention

[0003] An object of an embodiment of the present disclosure is to provide a new technical solution for generating a path of a virtual object.

[0004] According to a first aspect of the present disclosure, there is provided a method for generating a path of a virtual object, the method including:

[0005] Obtaining obstacle information in a virtual scene where the virtual object is located; wherein the obstacle information includes position information of each obstacle;

[0006] Determining target obstacles that intersect the first movement path among the respective obstacles according to the obstacle information and the first movement path of the virtual object in the virtual scene;

[0007] Setting an expanded area around the target obstacle according to a boundary position of the target obstacle;

[0008] Determining an obstacle avoidance point within the expanded area based on a reference point set by the expanded area;

[0009] Updating the first movement path to a second movement path according to the obstacle avoidance point.

[0010] In a possible implementation manner, the method further includes:

[0011] Obtaining feature information of the first movement path;

[0012] Filtering out path points at equal interval distances in the first movement path according to the feature information;

[0013] Reconstructing the first movement path according to the path points.

[0014] In a possible implementation, determining the target obstacles among the respective obstacles that intersect the first movement path in the virtual scene according to the obstacle information and the first movement path of the virtual object in the virtual scene includes:

[0015] Set a collision box in the virtual scene according to the first movement path of the virtual object in the virtual scene;

[0016] Among the respective obstacles, determine the target obstacles located within the collision box according to the obstacle information.

[0017] In a possible implementation, setting an expanded area around the target obstacle according to the boundary position of the target obstacle includes:

[0018] According to the boundary position of the target obstacle, determine the expanded points that are at a set distance from the boundary points of the target obstacle and the expanded contour formed by the expanded points;

[0019] Construct an expanded body according to the expanded contour;

[0020] Perform a Boolean shear process on the expanded body to obtain the expanded area.

[0021] In a possible implementation, the method further includes:

[0022] Determine the third path points in the first movement path that do not intersect the expanded area;

[0023] Updating the first movement path to a second movement path according to the obstacle avoidance points includes:

[0024] Construct a second movement path according to the third path points and the obstacle avoidance points.

[0025] In a possible implementation, constructing a second movement path according to the third path points and the obstacle avoidance points includes:

[0026] Determine the path intersection points, path start point, and path end point among the third path points;

[0027] Construct a second movement path according to the path intersection points, the path start point, the path end point, and the obstacle avoidance points.

[0028] In a possible implementation, the method further includes:

[0029] Determine the fourth path points in the first movement path that intersect the region edge of the expanded area;

[0030] Determine the smallest area segmented by the expansion area and the edge points of the smallest area according to the segmentation reference line formed by the center point set according to the expansion area and the fourth path point, and use them as the reference points set for the expansion area.

[0031] According to a second aspect of the present disclosure, there is also provided a data processing device for virtual objects, including:

[0032] An acquisition module for acquiring obstacle information in the virtual scene where the virtual object is located; wherein, the obstacle information includes the position information of each obstacle;

[0033] A determination module for determining target obstacles that intersect the first movement path among the respective obstacles according to the obstacle information and the first movement path of the virtual object in the virtual scene;

[0034] A setting module for setting an expansion area around the target obstacle according to the boundary position of the target obstacle;

[0035] A setting module for determining an obstacle avoidance point within the expansion area based on the reference point set for the expansion area;

[0036] An update module for updating the first movement path to a second movement path according to the obstacle avoidance point.

[0037] According to a third aspect of the present disclosure, there is also provided a computer system. The computer system includes a processor, and when the processor executes program instructions or code, the computer system implements the game scene control method in the first aspect. Exemplarily, the computer system further includes a memory for storing the program instructions or code.

[0038] According to a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium. A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the above-mentioned data processing method for virtual objects when running.

[0039] According to a fifth aspect of the present disclosure, there is also provided a computer program product including a game program. When the game program is executed, the computer is caused to execute the steps of the above-mentioned data processing method for virtual objects.

[0040] According to a sixth aspect of the present disclosure, there is also provided an electronic device including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the above-mentioned data processing method for virtual objects through the computer program.

[0041] One beneficial effect of the embodiments of the present disclosure is that the method for generating a path of a virtual object provided by the embodiments of the present disclosure can obtain obstacle information of the virtual object in the virtual scene, determine a target obstacle intersecting with the first movement path according to the obstacle information and the first movement path of the virtual object, determine an expanded area around the target obstacle, and determine an obstacle avoidance point in the expanded area. Furthermore, the first movement path of the virtual object can be updated to a second movement path through the obstacle avoidance point, so that the virtual object can move along the second movement path. The virtual object can effectively avoid the target obstacle when approaching the target obstacle, reduce the occurrence of the situation where the virtual object penetrates through the obstacle, and effectively improve the visual effect of the virtual scene.

[0042] The features and advantages of the embodiments of the present specification will become clear through the following detailed description of the exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings incorporated in and constituting a part of this specification illustrate embodiments of the present specification and, together with the description thereof, are used to explain the principles of the embodiments of the present specification.

[0044] Figure 1 The schematic hardware structure diagram of an electronic device that can be used to implement the method for generating a path of a virtual object according to the embodiments of the present disclosure is shown;

[0045] Figure 2 The schematic flowchart of the method for generating a path of a virtual object according to some embodiments is shown;

[0046] Figure 3 The schematic diagram showing the positional relationship of reference points according to some embodiments is shown;

[0047] Figure 4 The schematic structural diagram of the device for generating a path of a virtual object according to some embodiments is shown;

[0048] Figure 5 The schematic hardware structure diagram of an electronic device according to some embodiments is shown. DETAILED DESCRIPTION

[0049] Now, various exemplary embodiments of the present specification will be described in detail with reference to the accompanying drawings.

[0050] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of the present specification or their application or use.

[0051] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0052] It should be noted that all actions of obtaining signals, information, or data in the embodiments of the present disclosure are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and with the authorization given by the corresponding device owner.

[0053] The embodiments of the present disclosure provide a new path generation scheme for virtual objects, which allows determining obstacles passed through by a virtual object when the virtual object moves in a virtual scene, setting an expanded area around the obstacle, and setting obstacle avoidance points in the expanded area, so that the movement path of the virtual object is updated according to the obstacle avoidance points, thereby realizing that the virtual object bypasses obstacles during movement to reduce the occurrence of the virtual object penetrating the model and improving the visual effect of the virtual scene.

[0054] Figure 1 The figure shows a schematic hardware structure diagram of an electronic device that can be used to implement the path generation method of a virtual object according to an embodiment of the present disclosure.

[0055] The electronic device 1000 is a device capable of running a game. The game can be a local application installed on the electronic device, or an online game, a lightweight application, or a small program, etc., which is not limited herein. The electronic device 1000 can be a mobile phone, a tablet computer, a PC, etc., which is not limited herein.

[0056] As Figure 1 shown, the electronic device 1000 may include a processor 1101, a memory 1102, an interface device 1103, a communication device 1104, an output device 1105, an input device 1106, and so on. Figure 1 The hardware configuration shown is only illustrative and is by no means intended to limit the present disclosure, its application, or its use.

[0057] The processor 1101 is used to execute a computer program, which can be written in an instruction set of architectures such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1102 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), non-volatile memory such as a hard disk, etc. The interface device 1103 includes, for example, a USB interface, a network cable interface, a headphone interface, etc. The communication device 1104 can perform wired or wireless communication, for example. The communication device 1104 may include at least one short-range communication module, for example, any module that performs short-range wireless communication based on short-range wireless communication protocols such as the Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1104 may also include a remote communication module, for example, any module that performs WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The output device 1105 can include, for example, a liquid crystal display screen or a touch display screen, a speaker, etc. The input device 1106 can include, for example, a touch screen, a keyboard, a microphone, various sensors, etc.

[0058] In this embodiment, the memory 1102 of the electronic device 1000 is used to store a computer program, which is used to control the processor 1101 to operate to execute the path generation method of the virtual object according to any embodiment of the present disclosure.

[0059] Next, taking the electronic device 1000 as an example of the implementation subject, various embodiments of the path generation method of the virtual object will be described. Figure 1 For example, various embodiments of the path generation method of the virtual object will be described by taking the electronic device 1000 as the implementation subject.

[0060] <First Embodiment>

[0061] Figure 2 A path generation method of a virtual object according to some embodiments is shown. The path generation method of the virtual object may include the following steps S210 to S250:

[0062] Step S210, obtaining obstacle information in the virtual scene where the virtual object is located; wherein, the obstacle information includes the position information of each obstacle.

[0063] In this embodiment, the virtual scene may be constructed based on three-dimensional computer image software such as Houdini, Maya, Cinema 4D, etc.

[0064] In this embodiment, the obstacles in the virtual scene may be virtual objects preset at fixed positions in the virtual scene, and the virtual objects are generally virtual buildings, virtual mountains, or virtual vehicles, etc.

[0065] In this embodiment, the position information of each obstacle may include the position information of the blocking boundary of each obstacle. The blocking boundary of each obstacle may be obtained based on a preset blocking boundary generation file, which includes a first generation node, a second generation node, a third generation node, a fourth generation node, a fifth generation node, a sixth generation node, and a seventh generation node connected in sequence. In the first generation node 1.1 grid2, a planar polygon is created as a mask carrier; in the second generation node 1.2 attribfrommap, a mask map is imported and recorded on the carrier as a color attribute; in the third generation node 1.3 groupexpression17, points with a color less than 0.05 are selected and grouped into group1; in the fourth generation node 1.4 grouppromote7, group1 is converted to the primitives level; in the fifth generation node 1.5 blast12, these primitives with a color attribute less than 0.05 are deleted; in the sixth generation node 1.6 add1, unconnected isolated points are deleted and these isolated points are filtered; in the seventh generation node 1.7 attribdelete6, the color attribute of the points is deleted. Here, the blocking boundary is generally a blocking polygon. Through this blocking boundary generation file, points with a color less than 0.05 in the mask map can be extracted. These points with a color less than 0.05 are the boundary points of the blocking boundary of each obstacle. Then, the isolated points in these boundary points are screened out to obtain a blocking boundary with higher accuracy, and further, the position information of this blocking boundary can be obtained.

[0066] Step S220: Determine, according to the obstacle information and the first movement path of the virtual object in the virtual scene, the target obstacles among the various obstacles that intersect the first movement path.

[0067] In some examples, as Figure 3 shown, the path points in the first movement path of the virtual object include point K1, point a1, point a2, point a3, point K2, point K3, and point K4, and points a1, a2, and a3 are in obstacle A, and obstacle A is the target obstacle that intersects the first movement path.

[0068] Step S230: Set an expanded area around the target obstacle according to the boundary position of the target obstacle.

[0069] In some examples, as Figure 3 shown, the target obstacle is obstacle A, and the expanded area may be area B around this obstacle A.

[0070] Step S240: Determine, based on the reference points set in the expanded area, the obstacle avoidance points within the expanded area.

[0071] In some examples, the reference point is a point set within the expanded area, such as Figure 3 As shown, the reference point is point P0. And based on this reference point, the shortest path from point K1 to point K2 can be obtained as point K1 - point P1 - point P2 - point P0 - point P3 - point P4 - point K2. That is, the obstacle avoidance points within the expanded area are point P1, point P2, point P0, point P3, and point P4.

[0072] Step S250: Update the first movement path to a second movement path according to the obstacle avoidance points.

[0073] In some examples, updating the first movement path to the second movement path can be: replacing the first part of the path points of the first movement path with the second part of the path points of the second movement path. As Figure 3 As shown, the first movement path is point K1 - point a1 - point a2 - point a3 - point K2 - point K3 - point K4, and the second movement path is point K1 - point P1 - point P2 - point P0 - point P3 - point P4 - point K2 - point K3 - point K4. Here, the first part of the path points are point a1, point a2, and point a3, and the second part of the path points are point P1, point P2, point P0, point P3, and point P4.

[0074] According to the path generation method of the virtual object in the first embodiment of the present invention, it solves the problem in the prior art that there may be obstacles on the shortest path, causing the virtual object to penetrate the model. Based on this method, when the virtual object moves in the virtual scene, the obstacles passed through by the virtual object are determined, and an expanded area is set around the obstacle, and obstacle avoidance points are set in this expanded area, so that the movement path of the virtual object is updated according to the obstacle avoidance points, thereby enabling the virtual object to bypass the obstacles during the movement process, reducing the occurrence of the virtual object penetrating the model, and improving the visual effect of the virtual scene.

[0075] <Second Embodiment>

[0076] In this embodiment, in order to reduce the storage resources occupied by the first movement path of the virtual object, the path points at equal intervals in the first movement path can be extracted, and the first movement path can be reconstructed according to these path points, which can effectively reduce the redundant path points in the first movement path, thereby improving the utilization rate of the storage resources.

[0077] In these embodiments, compared with the above first embodiment, after step S220, the method further includes the following steps S310 to S330:

[0078] Step S310: Obtain the feature information of the first movement path.

[0079] In some examples, after obtaining the feature information of the first movement path, the method further includes: preprocessing the first movement path to obtain the preprocessed first movement path. The preprocessing of the first movement path may be to import the first movement path into a preset path reconstruction file, and the path reconstruction file may include a first preprocessing node, a second preprocessing node, a third preprocessing node, a fourth preprocessing node, a fifth preprocessing node, and a sixth preprocessing node connected in sequence. In the first preprocessing node 2.1 Road Curve, it is the entry of the original first movement path that needs to be processed by the externally imported HDA; in the second preprocessing node 2.2 Null, this node is an empty node used to reference and name the imported first movement path. In the third preprocessing node 2.3 attribdelete7, the feature information of the imported first movement path is deleted, and this feature information reflects the original attributes of the first movement path. In the fourth preprocessing node 2.4 resample1, the spacing density of the path points of the first movement path is resampled. In the fifth preprocessing node 2.5 polypath5, the curve is optimized and overlapping path points are filtered. In the sixth preprocessing node 2.6 groupdelete3, the unnecessary original grouping information in the imported first movement path is deleted.

[0080] Step S320, according to the feature information, filter out the path points with equal interval distances in the first movement path.

[0081] In this embodiment, this step S320 may be: import the feature information into a preset path setting file, and filter out the path points with equal interval distances in the first movement path. The path setting file may include a first path setting node to a sixteenth path setting node connected in sequence. In the first path setting node 5.1 attribdelete1, the attributes of the original first movement path are deleted. In the first path setting node 5.2 resample4, the first movement path is resampled. In the first path setting node 5.3 fuse1, the path points that are too close in the first movement path are merged. In the first path setting node 5.4 mark_end_point, using a vex script, all endpoints in the first movement path are marked, and the endpoint attribute is 1.

[0082] Step S330, according to the path points, reconstruct the first movement path.

[0083] In this embodiment, through these path points, the first movement path can be reconstructed. Moreover, for the reconstructed first movement path, on the one hand, it can reduce the storage resources occupied by the first movement path of the virtual object, and on the other hand, the vast majority of redundant path points are removed from the processed first movement path, effectively improving the accuracy of the first movement path.

[0084] <Third Embodiment>

[0085] In this embodiment, in order to accurately determine the target obstacle blocking the virtual object, a collision box is set according to the attributes of the first movement path, and then it is possible to determine that the obstacle within the collision box blocks the movement of the virtual object.

[0086] In these embodiments, compared with the above-mentioned first embodiment, step S220 may include the following steps S410 and S420:

[0087] Step S410, set a collision box in the virtual scene according to the first movement path of the virtual object in the virtual scene.

[0088] In this embodiment, step S410 may be: input the first movement path into a preset obstacle screening file to obtain the collision box corresponding to the first movement path. The obstacle screening file includes a first screening node. In the first screening node 3.1bound1, set the collision box size of the input first movement path.

[0089] Step S420, among the respective obstacles, determine the target obstacle located within the collision box according to the obstacle information.

[0090] In this embodiment, step S420 may be: input the obstacle information into a preset obstacle screening file to obtain the target obstacle located within the collision box. The obstacle screening file further includes a second screening node, a third screening node, a fourth screening node, and a fifth screening node. In the second screening node 3.2group15, only select the points within the collision box through the obstacle information and group them as group15. In the third screening node 3.3blast10, delete the other points except the group15 group. In the fourth screening node 3.4remove_unconnected_points5(ADD), delete the possibly unconnected isolated points for a filtering. In the fifth screening node 3.5matchsize5, zero the Y-axis of the center point of the target obstacle. By inputting the first movement path and the obstacle information into the obstacle screening file, the obstacle blocking the virtual object can be accurately screened out.

[0091] <Fourth Embodiment>

[0092] In this embodiment, in order to enable the virtual object to generate an outer expansion contour surrounding the target obstacle in a more reasonable manner based on the boundary of the target obstacle, and then obtain an outer expansion area through the outer expansion body constructed by the outer expansion contour, this makes the obtained outer expansion area.

[0093] In these embodiments, compared with the above-mentioned first embodiment, step S230 may include the following steps S510 to S530:

[0094] Step S510: Determine an expanded point that is at a set distance from the boundary point of the target obstacle and an expanded contour formed by the expanded points according to the boundary position of the target obstacle.

[0095] In this embodiment, the area construction file may include sequentially connecting the first construction node to the eleventh construction node. Step S510 may be: inputting the boundary position of the target obstacle into a preset area generation file, so that the first construction node to the fourth construction node of the area generation file determine an expanded point that is at a set distance from the boundary point based on the input boundary position and an expanded contour formed by the expanded points. In the first construction node 4.1edge smooth6, based on the boundary position of the target obstacle, smooth the contour of the blocking boundary of the target obstacle. In the second construction node 4.2polyexpand2d1, expand the contour of the blocking boundary outward along the center point of each primitive, and convert the contour of the blocking boundary from an edge attribute to a curve attribute. In the third construction node 4.3matchsize9, ensure that the Y-axis coordinate of the center point of the contour of the blocking boundary is 0. In the fourth construction node 4.4attribcreate2, add a normal attribute N to the contour of the blocking boundary and set the normal Y-axis direction value to 1.

[0096] Step S520: Construct an expanded body according to the expanded contour.

[0097] In this embodiment, step S520 may be: inputting the boundary position of the target obstacle into a preset area generation file, so that in the fifth construction node of the area generation file, the contour of the blocking boundary extrudes a polygon with a height along the normal of the contour of the blocking boundary, that is, an expanded body is constructed, that is, in the fifth construction node 4.5polyextrude2 node, extrude the polygon along the normal.

[0098] Step S530: Perform a Boolean shear process on the expanded body to obtain an expanded area.

[0099] In this embodiment, step S530 may be: inputting the boundary positions of the target obstacle into a preset region generation file, so that in the sixth to eleventh construction nodes of the region generation file, the outer expansion body cuts out an outer expansion region based on a Boolean operation. That is, in the sixth construction node 4.6 matchsize2, ensure that the Y-axis coordinate of the center point of the extruded polygon is 0. In the seventh construction node 4.7 boolean1, remove the self-intersecting points generated in the extruded polygon. In the eighth construction node 4.8 grid1, create a cutting plane for the Boolean operation. In the ninth construction node 4.9 matchsize10, align the cutting plane with the axis of the previously extruded polygon. In the tenth construction node 4.10 boolean6, cut out the outer expansion region through a Boolean operation. In the eleventh construction node 4.11 normal2, unify the vertex normal direction of the outer expansion region to the positive Y-axis direction.

[0100] <Fifth Embodiment>

[0101] In this embodiment, in order to further improve the accuracy of the constructed second movement path, the second movement path may be constructed by using a third path point and an obstacle avoidance point.

[0102] In these embodiments, compared with the above-mentioned first embodiment, before step S250, the method further includes the following step S610:

[0103] Step S610, determining a third path point in the first movement path that does not intersect with the outer expansion region.

[0104] In this embodiment, step S610 may be as follows: input the first movement path into a preset path setting file, so that in the fifth path setting node 5.5groupexpression10 of the path setting file, select all the intersection points in the first movement path and group them as break_point. In the sixth path setting node 5.6attribdelete2, delete the point Cd attribute. In the seventh path setting node 5.7convertline1, change the curve attribute of the first movement path into a line segment attribute and output the restlength length attribute. In the eighth path setting node 5.8groupexpression3, find out the line segments whose restlength attribute is greater than 1.5 times the average length attribute avg_length, group them as new_prim, and filter out abnormal flying lines. In the ninth path setting node 5.9blast2, delete the flying lines in the new_prim group. In the tenth path setting node 5.10group11, use the target obstacle as a detection collision box to select the points in the intersecting part. In the eleventh path setting node 5.11blast7, delete the point group in the intersecting part to determine the third path points in the first movement path that do not intersect with the expanded area.

[0105] Based on this, step S250 may include the following step S2501:

[0106] Step S2501, construct a second movement path according to the third path points and the obstacle avoidance points.

[0107] In this embodiment, the second movement path constructed by the third path points and the obstacle avoidance points eliminates the redundant points in the first movement path, effectively improving the accuracy of the second movement path.

[0108] <Sixth Embodiment>

[0109] In this embodiment, in order to further improve the accuracy of the second movement path, a second movement path is constructed through path intersection points, path start points, path end points and obstacle avoidance points.

[0110] In these embodiments, compared with the above fifth embodiment, step S2501 may include the following step S710 and step S720:

[0111] Step S710, determine the path intersection points, path start points and path end points among the third path points.

[0112] Step S720, construct a second movement path according to the path intersection points, the path start points, the path end points and the obstacle avoidance points.

[0113] In this embodiment, in the twelfth path setting node 5.12 remove_unconnected_points1 of the path setting file, the unconnected isolated points in the first movement path are detected and removed. In the thirteenth path setting node 5.13 groupexpression9, the points with the endpoint attribute of 0 in the first movement path are selected. Among the points at these intersection parts, the points serving as endpoints are selected and grouped into end_point_ori, that is, the endpoints generated at the second movement path. In the fourteenth path setting node 5.14 groupexpression11, the inflection points with hard turns but not fork roads are selected. In the fifteenth path setting node 5.15 group12, the non-fork turning points and obstacle avoidance endpoints are merged and grouped into end_point_ori. In the sixteenth path setting node 5.16 group7, all path points not participating in obstacle avoidance are grouped into ori_prim, that is, the path intersection points, path start points, and path end points are grouped into ori_prim, so as to perform morphological sorting and grouping processing on the path points that do not need to perform obstacle avoidance in the original first movement path, so as to facilitate constructing the second movement path in combination with the obstacle avoidance points subsequently.

[0114] In some examples, after obtaining the feature information of the first movement path, the method further includes: setting the sampling length mean value of the second movement path. Among them, setting the sampling length mean value of the second movement path and integrating may be: inputting the feature information of the first movement path into a preset mean value processing file to determine the balance degree and number of faces of the turning points in the second movement road surface. The mean value processing file includes a first mean value processing node and a second mean value processing node. In the first mean value processing node 7.1 convertline2, the original curve attribute of the first movement path is converted into a line segment attribute. In the second mean value processing node 7.2 avg_length, the average value of the "restlength" attributes of all the original geometries in the geometry is calculated and written into the avg_length attribute at the detail level. The specific writing code is as follows:

[0115]

[0116] In some examples, after setting the sampling length mean value of the second movement path, the method further includes: integrating the second movement path according to the second movement path and the sampling length mean value, connecting the respective path points of the second movement path, and optimizing the curve form of the second movement path. Specifically, it may be: inputting the second movement path and the sampling length mean value into a preset path optimization file to obtain the optimized second movement path. The path optimization file includes a first path optimization node to an eighteenth path optimization node.

[0117] In the first path optimization node 8.1 merge2, the second moving path with detour processing and the original unchanged first moving path are merged. In the second path optimization node 8.2 group17, a point group end_point_new end_point_ori of the path points of the second moving path with detour and the path points of the first moving path without detour is selected. In the third path optimization node 8.3 groupexpand4, the selection range of the path points is expanded. In the fourth path optimization node 8.4 color3, the connection is dyed to mark the vertex color. In the fifth path optimization node 8.5 merge_splines1, the second moving path with detour and the first moving path without detour are merged, and a curve connection is established between the path points. In the sixth path optimization node 8.6 polypath1, the first moving path and the second moving path are integrated to ensure the continuity of the curve. In the seventh path optimization node 8.7 resample5 node, the curve is resampled. The average sampling length of the original curve can be optionally called (introducing the 7.2 avg_length node: detail(-1, "avg_length", 0)), or the sampling length can be re-specified here. In the eighth path optimization node 8.8 polypath3, the curve is sorted again, and the common points of the connected curves are removed to reduce the number of primitives. In the ninth path optimization node 8.9 measure_curvature1, the convex curvature of each point of the curve is calculated and recorded in the convexity attribute. In the tenth path optimization node 8.10 groupexpression4, the sharp curvature points @convexity > 0.98 are selected and grouped as too_sharp. In the eleventh path optimization node 8.11 groupexpand5, the selection range of a point is expanded. In the twelfth path optimization node 8.12 blast1, the sharp point group too_sharp is deleted. In the thirteenth path optimization node 8.13 attribdelete5, the point attributes are cleared. In the fourteenth path optimization node 8.14 groupdelete1, the group information is cleared. In the fifteenth path optimization node 8.15 groupexpression13, on the new curve, the information of the curve endpoints and intersection points is reset. endpoint group: neighbourcount(0, @ptnum) == 1 breakpoints group: neighbourcount(0, @ptnum) > 2 In the sixteenth path optimization node 8.16 groupexpression14, the path endpoints and path intersection points are reset.cons_pt_end: neighbourcount(0, @ptnum) == 1 cons_pt: neighbourcount(0, @ptnum) > 2 In the 17th path optimization node 8.17 groupexpand3, expand the selection range of the path end point cons_pt_end. In the 18th path optimization node 8.18 smooth1, after excluding the end points and intersection points (cons_pt cons_pt_end), globally smooth the curvature of the second movement path to achieve the output completion.

[0118] <The Seventh Embodiment>

[0119] In this embodiment, in order to automatically interrupt at the passed obstacles and generate the second movement path with the shortest distance, the minimum area divided by the expansion area and the edge points of the minimum area can be determined by the fourth path point that intersects the regional edge of the expansion area in the first movement path, and used as the reference point. Then, using this reference point, a second movement path with higher accuracy can be obtained.

[0120] In these embodiments, compared with the above first embodiment, before step S240, the method further includes the following steps S810 and S820:

[0121] Step S810, determine the fourth path point in the first movement path that intersects the regional edge of the expansion area.

[0122] In this embodiment, the preset path generation file may include the first path generation node to the forty-eighth path generation node, and this step S810 may be: input the first movement path and the target obstacle into the first path generation node to the nineteenth path generation node of the preset reference point determination file to obtain the fourth path point in the first movement path that intersects the regional edge of the expansion area.

[0123] In the first path generation node 6.1connectivity1, add a class attribute according to the topological connectivity to distinguish the set fragments that form a structure by themselves. In the second path generation node 6.2foreach_begin4, perform a point-by-point FOR loop. In the third path generation node 6.3iteration, record the number of iterations. In the fourth path generation node 6.4fuse2, merge the path points with too small a distance in the first moving path. In the fifth path generation node 6.5dissolve_flat_edges1, optimize the topological structure while ensuring the contour structure of the target obstacle remains unchanged, and reduce the point density on the contour structure. In the sixth path generation node 6.6resample3, resample the contour of the target obstacle. In the seventh path generation node 6.7matchsize6, set the Y-axis of the center point to zero. In the eighth path generation node 6.8group4, select the edge points of the contour of the target obstacle and group them as ori_edge. In the ninth path generation node 6.9polyextrude4, extrude the height for the blocking polygon. In the tenth path generation node 6.10groupexpand1, adjust the selection range of the edge point group to include the extruded edges. In the eleventh path generation node 6.11groupdelete2, input from the 5.3fuse1 node and delete its original breakpoints group. In the twelfth path generation node 6.12attribdelete4, delete the attached attributes Cd id outside_volume, perimeter old_perimeter, f_locked, Cd of the first moving path. In the thirteenth path generation node 6.13attribcreate1, add the normal attribute N to the first moving path and set the orientation to the positive Y-axis direction. In the fourteenth path generation node 6.14polyextrude3, extrude the height along the normal of the first moving path. In the fifteenth path generation node 6.15boolean2, perform a union operation to eliminate redundant points. In the sixteenth path generation node 6.16matchsize4, extrude the first moving route along the Y-axis of the target obstacle and align it to the center Y-axis of the target obstacle. In the seventeenth path generation node 6.17boolean3, subtract the first moving route from the block and output the seam to obtain the path curve entering the interior of the target obstacle, and establish an edge group inner_path. In the eighteenth path generation node 6.18boolean4, perform a union operation to eliminate redundant points (the points cut out by the cutting plane, there are two at one position, but actually only one valid point).In the nineteenth path generation node 6.19grouptransfer2, the inner_path group is passed to the new points after union to determine the fourth path point in the first movement path that intersects the regional edge of the expanded area.

[0124] Step S820: According to the segmentation reference line formed by the center point set by the expanded area and the fourth path point, determine the smallest area segmented by the expanded area and the edge points of the smallest area, and use them as the reference points set by the expanded area.

[0125] In this embodiment, step S810 may be: in the twentieth path generation node to the forty-eighth path generation node of the preset reference point determination file, obtain the segmentation reference line formed by the center point set by the expanded area and the fourth path point, and then determine the smallest area segmented by the expanded area and the edge points of the smallest area.

[0126] In the twentieth path generation node 6.20normal1, reset the normal direction of the first movement path. In the twenty-first path generation node 6.21delete3, delete the target obstacles that do not meet the conditions according to the set normal direction. In the twenty-second path generation node 6.22matchsize8, set the Y-axis of the center point of the target obstacle to zero. In the twenty-third path generation node 6.23group14, select the points on the outer contour edge of the target obstacle, and the group name is edge. In the twenty-fourth path generation node 6.24extract_endPt_raw, detect each point of the target obstacle. If the point is not in the point group named ori_edge, add it to the point group named end_road_pt, that is, select the points where the first movement path intersects the edge of the target obstacle.

[0127]

[0128] {

[0129] setpointgroup(0,end_road_pt,@ptnum,1,"set");

[0130] }

[0131] In the twenty-fifth path generation node 6.25groupexpand2, expand the selection area of ori_edge to include the edge intersection points.

[0132] In the twenty-sixth path generation node 6.26grouppromote4, convert the outer edge point group ori_edge to the edge level and name it aviod_edge.

[0133] In the 27th path generation node 6.27groupexpression15, the intersection points are selected when len(neighbours(0, @ptnum)) == 3.

[0134] In the 28th path generation node 6.28extract_breakPt, if a point in the break_road_pt point group is detected in the edge_group, then remove that point.

[0135] string edge_group = "ori_edge";

[0136] string break_road_pt = "break_road_pt";

[0137] if (inpointgroup(0, edge_group, @ptnum))

[0138] {

[0139] setpointgroup(0, break_road_pt, @ptnum, 0, "set");

[0140] }

[0141] In the 29th path generation node 6.29extract_endPt, finally, the members of the point group are dynamically adjusted according to the number of neighbors and the group to which the check points belong, and the redundant points are screened and repaired.

[0142] If a point is not in the ori_edge group and has multiple neighbors, then remove it from the end_road_pt group. In this way, only two end points are left in end_road_pt.

[0143] If a point has only one neighbor, then add it to the inner_end_pt group. That is, the inner end point that is covered.

[0144] If a point is in the ori_edge group, then add it to the end_road_ptOUT group. That is, the outer end point that is not covered.

[0145] string ori_edge = "ori_edge";

[0146] string end_road_pt = "end_road_pt";

[0147] string inner_end_pt = "inner_end_pt";

[0148] int nearpt = len(neighbours(0, @ptnum));

[0149]

[0150] In the 30th path generation node 6.30grouppromote5, convert the edge group inner_path into a point group hierarchy.

[0151] In the 31st path generation node 6.31findshortestpath1, find the shortest topological path between the covered intersection points and the covered road endpoints.

[0152] Save the original serial numbers of the points on this path in the origpt attribute.

[0153] In the 32nd path generation node 6.32delete_complete_innerpath, traverse the second channel input, obtain the value of the point attribute "origpt", and add it to the points_to_remove array. Find the corresponding points in the points_to_remove array that have the endpt attribute in the prim level, remove them from the array, and delete the points in the array. Retain the endpt as the end point, that is, delete the completely covered small branches in the covered bifurcated roads.

[0154]

[0155] for(int primIndex = 0; primIndex < nprimitives(1); ++primIndex) {

[0156] int b_value = prim(1, "endpt", primIndex);

[0157] int indexToRemove = find(points_to_remove, b_value);

[0158] if(indexToRemove!= -1) {

[0159] removeindex(points_to_remove, indexToRemove);

[0160] }

[0161] }

[0162] foreach(int pt_to_remove; points_to_remove) {

[0163] removepoint(0, pt_to_remove);

[0164] }

[0165] In the thirty-third path generation node 6.33 findshortestpath2, find the shortest topological distance between the center point set for the expanded area and the fourth path point.

[0166] In the thirty-fourth path generation node 6.34 extract_innerpath1, according to this shortest topological path, obtain the value of the point attribute origpt among them. This value is the original serial number of these points. Group these points, named inner_path2, that is, classify the routes that do not penetrate the mountain body and name them inner_path2.

[0167] int points_to_remove[];

[0168] / / point to delete

[0169] for(int i = 0; i < npoints(1); ++i) {

[0170] int a_value = point(1, "origpt", i);

[0171] append(points_to_remove, a_value);

[0172] }

[0173] foreach(int pt_to_remove; points_to_remove) {

[0174] setpointgroup(0, "inner_path2", pt_to_remove, 1, "set");

[0175] }

[0176] In the thirty-fifth path generation node 6.35 grouppromote1, convert the inner_path group to the edge level.

[0177] In the thirty-sixth path generation node 6.36 measure1, calculate the area of each block of the input primitives, that is, the area of each region divided by the expanded area.

[0178] In the 37th path generation node 6.37get_largest_part, traverse each primitive, write its area value to the max_area attribute at the detail level, and provide data for subsequent retrieval.

[0179]

[0180] In the 38th path generation node 6.38groupexpression12, select the face with the largest area @area == @max_area and group it as largest_part. In the 39th path generation node 6.39blast8, delete the largest_part group, and obtain the smallest area segmented by the expanded area and the edge points of the smallest area. In the 40th path generation node 6.40foreach_begin2, the loop starts. In the 41st path generation node 6.41convertline6, divide the curve into line segments and select the line segments in non-inner_path groups. In the 42nd path generation node 6.42

[0181] foreach_end2, the loop ends. In the 43rd path generation node 6.43remove_unconnected_points2, detect and delete redundant points not connected to the line segments. In the 44th path generation node 6.44polypath2, connect the line segments into a curve. In the 45th path generation node 6.45groupexpression8, select the two endpoints of the curve, len(neighbours(0, @ptnum)) == 1; name it the end_point_new group. In the 46th path generation node 6.46subnet1, an integrated functional module processes the roads that are half pressed under the mountain and not drilled out. In the 47th path generation node 6.47merge1, merge the roads in the cases of penetration and truncation. In the 48th path generation node 6.48foreach_end4, the loop ends.

[0182] <Device Embodiment>

[0183] Figure 4 Shows a schematic diagram of the composition structure of a path generation device for virtual objects according to an embodiment of the present disclosure. As Figure 4 shown, the path generation device 400 for virtual objects includes an acquisition module 410, a determination module 420, a setting module 430, a setting module 440, and an update module 450.

[0184] The obtaining module 410 is configured to obtain obstacle information in the virtual scene where the virtual object is located; wherein, the obstacle information includes the position information of each obstacle.

[0185] The determining module 420 is configured to determine, according to the obstacle information and the first movement path of the virtual object in the virtual scene, a target obstacle among the obstacles that intersects with the first movement path.

[0186] The setting module 430 is configured to set an expanded area around the target obstacle according to the boundary position of the target obstacle.

[0187] The setting module 440 is configured to determine an obstacle avoidance point within the expanded area based on a reference point set by the expanded area.

[0188] The updating module 450 is configured to update the first movement path to a second movement path according to the obstacle avoidance point.

[0189] In some embodiments, the path generation device 400 of the virtual object further includes a reconstruction module, and the reconstruction module is configured to obtain the feature information of the first movement path; filter out path points at equal intervals in the first movement path according to the feature information; and reconstruct the first movement path according to the path points.

[0190] In some embodiments, the determining module 420 is further configured to set a collision box in the virtual scene according to the first movement path of the virtual object in the virtual scene; and determine, among the obstacles, a target obstacle located within the collision box according to the obstacle information.

[0191] In some embodiments, the setting module 430 is further configured to determine an expanded point at a set distance from the boundary point of the target obstacle and an expanded contour formed by the expanded points according to the boundary position of the target obstacle; construct an expanded body according to the expanded contour; and perform a Boolean shear process on the expanded body to obtain an expanded area.

[0192] In some embodiments, the path generation device 400 of the virtual object further includes a path point determination module, and the path point determination module is configured to determine third path points in the first movement path that do not intersect with the expanded area.

[0193] The updating module 450 is further configured to construct a second movement path according to the third path points and the obstacle avoidance points.

[0194] In some embodiments, the update module 450 is further configured to determine path intersection points, a path start point, and a path end point among the third path points; and construct a second movement path according to the path intersection points, the path start point, the path end point, and the obstacle avoidance point.

[0195] In some embodiments, the path generation device 400 of the virtual object further includes a reference point determination module, which is configured to determine a fourth path point that intersects with the region edge of the expansion region in the first movement path; and determine the smallest region segmented by the expansion region and the edge points of the smallest region according to the segmentation reference line formed by the center point set by the expansion region and the fourth path point, and use them as the reference points set by the expansion region.

[0196] <Device Embodiment>

[0197] Figure 5 FIG. shows a schematic hardware structure diagram of an electronic device according to some other embodiments. As Figure 5 shown, the electronic device 500 includes a processor 510 and a memory 520. The memory 520 is used to store a computer program, and the computer program is used to control the processor 510 to operate, so as to control the electronic device 500 to execute the data processing method of the virtual object according to any embodiment of the present disclosure.

[0198] An embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program, and the computer program realizes the data processing method of the virtual object according to any embodiment of the present disclosure when executed by a processor.

[0199] An embodiment of the present disclosure also provides a computer program product, which includes a computer program or instruction, and the computer program or instruction realizes the data processing method of the virtual object according to any embodiment of the present disclosure when executed by a processor.

[0200] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.

[0201] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.

[0202] Embodiments of this specification can be devices, methods, and / or computer program products. A computer program product can include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the embodiments of this specification.

[0203] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium used herein is not to be construed as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0204] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to respective computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0205] The computer program instructions for performing the operations of the embodiments of this specification may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the embodiments of this specification.

[0206] Aspects of the embodiments of this specification are described herein with reference to the flowcharts and / or block diagrams of methods, apparatuses (devices), and computer program products according to the embodiments of this specification. It should be understood that each block of the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0207] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing apparatus, a device is produced that implements the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, which causes a computer, a programmable data processing apparatus, and / or other devices to work in a specific manner. Thus, the computer-readable medium storing the instructions includes a manufactured article that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0208] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.

[0209] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present specification. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions. As is well known to those skilled in the art, implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.

[0210] The embodiments of the present specification have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art in the technical field without departing from the scope of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of technologies in the market, or to enable other ordinary skilled persons in the technical field to understand the embodiments disclosed herein.

Claims

1. A method for generating a path of a virtual object, the method comprising: Obtaining obstacle information in a virtual scene where the virtual object is located; wherein the obstacle information includes position information of each obstacle; Determine, according to the obstacle information and the first moving path of the virtual object in the virtual scene, a target obstacle intersecting with the first moving path among the obstacles; According to the boundary position of the target obstacle, setting an outer expansion area around the target obstacle; Determining an obstacle avoidance point within the expanded area based on a reference point set for the expanded area; The first moving path is updated to a second moving path according to the obstacle avoidance point.

2. The method according to claim 1, wherein: The method further comprises: Acquiring characteristic information of the first moving path; According to the feature information, path points with equal spacing in the first moving path are screened out; The first moving path is reconstructed according to the path points.

3. The method according to claim 1, wherein: The determining, according to the obstacle information and the first moving path of the virtual object in the virtual scene, a target obstacle intersecting with the first moving path among the obstacles comprises: According to a first moving path of the virtual object in the virtual scene, setting a collision box in the virtual scene; Among the obstacles, a target obstacle located within the collision box is determined according to the obstacle information.

4. The method according to claim 1, wherein: The step of setting an outer expansion area around the target obstacle according to the boundary position of the target obstacle includes: Determine, according to the boundary position of the target obstacle, an expansion point that is a set distance away from the boundary point of the target obstacle and an expansion contour formed by the expansion point; constructing an outward expansion body according to the outward expansion contour; The outward expansion body is subjected to Boolean shearing processing to obtain an outward expansion area.

5. The method according to claim 1 or 2, wherein: The method further comprises: Determine a third path point in the first moving path that does not intersect the outward expansion area; The updating of the first moving path to a second moving path according to the obstacle avoidance point includes: A second moving path is constructed according to the third path point and the obstacle avoidance point.

6. The method according to claim 5, wherein: The step of constructing a second moving path according to the third path point and the obstacle avoidance point comprises: Determine a path intersection point, a path starting point, and a path end point in the third path point; A second moving path is constructed according to the path intersection point, the path starting point, the path end point and the obstacle avoidance point.

7. The method according to claim 1, wherein: The method further comprises: Determining a fourth path point in the first moving path that intersects with an area edge of the outward-expanding area; According to the division reference line formed by the center point set for the outward expansion area and the fourth path point, the minimum area divided by the outward expansion area and the edge points of the minimum area are determined and used as the reference points set for the outward expansion area.

8. A virtual object path generation device, wherein: include: An acquisition module, used to acquire obstacle information in the virtual scene where the virtual object is located; wherein the obstacle information includes position information of each obstacle; A determination module, configured to determine, according to the obstacle information and the first moving path of the virtual object in the virtual scene, a target obstacle among the obstacles that intersects with the first moving path; A setting module, used for setting an outer expansion area around the target obstacle according to the boundary position of the target obstacle; A setting module, configured to determine an obstacle avoidance point within the outer expansion area based on a reference point set in the outer expansion area; An updating module is used to update the first moving path to a second moving path according to the obstacle avoidance point.

9. An electronic device, wherein: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the method steps according to any one of claims 1 to 7 under the control of the computer program.

10. A computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein: When the computer program is executed, the method steps of any one of claims 1 to 7 are performed.