Method and device for generating return point
By automatically judging the falling risk of the navigation grid edge area and generating return points, the problem of inefficient return points setting in virtual reality scenarios is solved, and the virtual character can quickly and accurately return to the original position.
Patent Information
- Application Number
- CN202211137092.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-09-19
AI Technical Summary
In virtual reality scenarios, manual setting of return points is inefficient and cumbersome, making it difficult for virtual characters to return to their original position after falling from a place where they are prone to fall.
By determining the height difference between the edge area of the navigation grid and the adjacent grid, the fall risk area is automatically judged, and a return point is generated in this area, and the mapping relationship between the fall risk area and the return point is configured so that the virtual character can fall reload to return point.
Improves the efficiency and accuracy of return point settings, reduces manual intervention, and automatically determines and generates fall risk areas and return points in virtual scenes.
Smart Images

Figure CN115445200B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of electronic information, and in particular to a method and device for generating a return point. Background Art
[0002] Currently, there are some places where falling is likely to occur (such as cliffs) in virtual reality scenes. When a virtual character falls from these places, it is difficult to return to the place before the fall. Therefore, return points are usually manually set in the grid areas of the plots where each falling location belongs, so that the virtual character can be reloaded to the return point after falling.
[0003] In the related art, each return point is usually set manually in the virtual scene. Specifically, after the virtual scene is built, the tester finds a path in the virtual scene to determine the place where falling is likely to occur, and then manually selects a suitable location to set the return point according to the place where falling is likely to occur. However, this method is inefficient and complicated to operate. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide a method and device for generating a return point that overcomes the above problems or at least partially solves the above problems.
[0005] According to one aspect of the present invention, a method for generating a return point is provided, the method comprising:
[0006] For any navigation grid, determining whether a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold;
[0007] When the height difference is greater than the first threshold, determining the grid edge area as a falling risk area;
[0008] A return point is generated for the fall risk area, and a mapping relationship between the fall risk area and the return point is configured so that when it is detected that the virtual character in the virtual scene falls from the fall risk area, the virtual character is reloaded to the return point.
[0009] In some examples, generating a return point for the fall risk area, and configuring a mapping relationship between the fall risk area and the return point so that when a virtual character in the virtual scene is detected to fall from the fall risk area, the virtual character is reloaded to the return point includes:
[0010] Dividing the fall risk area into a plurality of sub-areas, and determining at least two sub-areas as return areas;
[0011] A return point is generated for each return area respectively, and a mapping relationship between each return area and each return point is configured, so that when it is detected that the virtual character in the virtual scene falls from the return area, the virtual character is reloaded to the corresponding return point.
[0012] In some examples, dividing the fall risk area into a plurality of sub-areas includes at least one of the following:
[0013] Dividing the fall risk area into a plurality of sub-areas according to the terrain distribution characteristics of the fall risk area;
[0014] Dividing the fall risk area into a plurality of sub-areas according to the area of the fall risk area;
[0015] The fall risk area is divided into a plurality of sub-areas according to a loading frequency of the fall risk area.
[0016] In some examples, determining, for any navigation grid, whether a height difference between a grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold comprises:
[0017] emitting a detection ray with at least one point in the grid edge region of the navigation grid as a first starting point to detect whether a height difference between the grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold;
[0018] When the height difference is greater than the first threshold and the grid edge area is determined as a falling risk area, generating a return point for the falling risk area includes: generating a return point on the surface of the falling risk area corresponding to the first starting point.
[0019] In some examples, the detection ray includes a first detection sub-ray and a second detection sub-ray; and emitting the detection ray with at least one point in the grid edge area of the navigation grid as a first starting point includes:
[0020] Taking at least one point in the edge area of the grid as a first starting point and emitting a first detection sub-ray along a first direction to determine whether there is an obstacle in the first direction;
[0021] When it is determined that there is no obstacle in the first direction, the end of the first detection sub-ray is used as the second starting point and a second detection sub-ray is emitted along the second direction to detect whether the height difference in the second direction is greater than a first threshold; wherein the first direction and the second direction are perpendicular.
[0022] In some examples, the step of taking the end of the first detection sub-ray as the second starting point and emitting the second detection sub-ray along the second direction to detect whether the height difference in the second direction is greater than the first threshold comprises:
[0023] Taking the end of the first detection sub-ray as the second starting point and emitting a second detection sub-ray with a length equal to the first threshold along a second direction;
[0024] Whether the height difference in the second direction is greater than a first threshold is determined according to whether the end of the second detection sub-ray touches an obstacle.
[0025] In some examples, for a grid edge region of any navigation grid, a first starting point is determined by:
[0026] Determine any point on any grid edge line of the navigation grid as an initial point;
[0027] Moving the initial point by a first distance in a direction perpendicular to the navigation grid and away from the navigation grid;
[0028] The initial point is moved by a second distance in a direction approaching a central area of the navigation grid to which the grid edge line belongs, as the first starting point.
[0029] In some examples, generating a return point on the surface of the fall risk area corresponding to the first starting point includes:
[0030] Taking the first starting point as a reference point, emitting a detection ray in a direction perpendicular to the navigation grid and close to the navigation grid;
[0031] When it is detected that the detection ray contacts the surface of the navigation grid, the return point is generated at the contact position between the two.
[0032] In some examples, after generating a return point for the fall risk area and configuring a mapping relationship between the fall risk area and the return point so that when a virtual character in the virtual scene is detected to fall from the fall risk area, the virtual character is reloaded to the return point, the method further includes:
[0033] determining a terrain attribute of the fall risk area at the return point;
[0034] Configure a return posture attribute that matches the return point according to the terrain attribute;
[0035] The terrain attribute includes at least one of the following: surface material type, surface shape type; the return posture attribute includes one of the following: character orientation, character action, character status.
[0036] According to another aspect of the present invention, a return point generation device is provided, which is applied in a virtual scene including a plurality of navigation grids, and the device comprises:
[0037] a first determining module, configured to determine, for any navigation grid, whether a height difference between a grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold;
[0038] A second determining module, configured to determine the grid edge area as a falling risk area when the height difference is greater than the first threshold;
[0039] A generation module is used to generate a return point for the fall risk area and configure a mapping relationship between the fall risk area and the return point so that when it is detected that the virtual character in the virtual scene falls from the fall risk area, the virtual character is reloaded to the return point.
[0040] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0041] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the above method.
[0042] According to another aspect of the embodiments of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute the above method.
[0043] In the return point generation method and device provided by the present invention, for any navigation grid, it is judged whether the grid edge area has a falling risk based on the height difference between the grid edge area of the navigation grid and the adjacent grids. If so, the grid edge area is determined as a falling risk area, and then a return point is generated for the falling risk area. In this way, the falling risk area in the virtual scene can be automatically determined, and then the return point is automatically generated for the falling risk area. Compared with the method of manually testing the virtual scene and then manually setting the return point, the efficiency and accuracy of setting the return point are effectively improved.
[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0046] Figure 1 A flow chart showing a method for generating a return point provided by an embodiment of the present invention is shown;
[0047] Figure 2 A flow chart showing a method for generating a return point provided by another embodiment of the present invention is shown;
[0048] Figure 3 A schematic structural diagram of a return point generation device provided by another embodiment of the present invention is shown;
[0049] Figure 4 A schematic structural diagram of an electronic device provided by yet another embodiment of the present invention is shown. DETAILED DESCRIPTION
[0050] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0051] Figure 1 A flow chart of a method for generating a return point provided by an embodiment of the present invention is shown.
[0052] like Figure 1 As shown, the method includes:
[0053] S11. For any navigation grid, determine whether a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold.
[0054] Among them, the method provided in this embodiment is applied in a virtual scene, and the virtual scene includes various scenes presented by an electronic screen, such as a game scene, a virtual reality scene, a human-computer interaction scene, etc. The virtual scene contains multiple navigation meshes (Navigation Mesh), and the navigation mesh is a polygonal mesh data structure that determines a walkable path in a virtual space. Specifically, after the scene model of the virtual scene is built, the navigation mesh can be established based on the virtual scene in the following manner: voxelization (i.e., rasterization) is performed on the scene model (e.g., the surface mesh model) that can carry the virtual character; based on the voxelized scene model, the walkable surface of the scene model is filtered out; the walkable surface of the scene model is divided into multiple regions (Regions); based on the multiple regions, the contour of the region (Contour) is drawn; based on the drawn contour, a navigation mesh containing multiple convex polygons (Convex Polygon, Poly Mesh) is generated.
[0055] For any navigation grid in a virtual scene, a navigation grid has four grid boundary lines, and the surrounding area of the grid boundary line located at the edge of the terrain in the virtual scene among the four grid boundary lines of the navigation grid is defined as the grid edge area of the navigation grid. It should be noted that whether the grid boundary line of the navigation grid is located at the edge of the terrain can be determined based on the terrain distribution characteristics contained in the grid attribute information of the navigation grid. Among them, the grid edge area of a navigation grid is defined as: taking the grid boundary line located at the edge of the terrain in the navigation grid as a reference, the grid boundary line is translated toward the center of the navigation grid to which the grid boundary line belongs. The area covered by the preset distance, the value of the preset distance is greater than 0 and less than the vertical distance between the grid boundary line and the grid center line, wherein the grid center line passes through the grid center point and is parallel to the grid boundary line.
[0056] Furthermore, a navigation mesh adjacent to a navigation mesh is a navigation mesh adjacent to a grid boundary line in the navigation mesh located at the edge of the terrain. By determining whether the height difference between a grid edge area of the navigation mesh and a navigation mesh adjacent to the navigation mesh is greater than a first threshold, it is possible to determine whether there is a risk of falling when the virtual character walks from the grid edge area of the navigation mesh to the navigation mesh adjacent to it.
[0057] Furthermore, the first threshold defines the height difference that will cause the risk of falling. The value of the first threshold is a natural number greater than 0. The height difference between the grid edge area of the navigation grid and the navigation grid adjacent to the navigation grid refers to the height difference generated in the downward direction perpendicular to the surface of the navigation grid with the height of the surface of the navigation grid as the zero point. Correspondingly, the value of the height difference generated in the upward direction perpendicular to the surface of the navigation grid is a negative number.
[0058] The height difference between a grid edge region of a navigation grid and a navigation grid adjacent to the grid edge region of the navigation grid may be determined by ray detection, or may be determined based on vertex coordinates of the grid edge region and vertex coordinates of the adjacent navigation grid.
[0059] S12: When a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold, determine the grid edge area as a falling risk area.
[0060] If the height difference between a grid edge area of a navigation grid and a navigation grid adjacent to the navigation grid is less than or equal to a first threshold, the boundary area from the grid edge area to the adjacent navigation grid is regarded as a normal walking area, and the virtual character will not fall when walking from the grid edge area to the adjacent navigation grid, and can continue to perform walking actions on the surface of the adjacent navigation grid; if the height difference between the grid edge area of the navigation grid and the adjacent navigation grid is greater than the first threshold, the boundary area from the grid edge area to the adjacent navigation grid is regarded as an area where there is a risk of falling, and the grid edge area is further determined as a falling risk area.
[0061] Specifically, determining the grid edge area as a fall risk area in S12 includes: generating a fall risk area identifier according to the location information of the grid edge area; adding a fall risk area identifier under the root node of the area (Area) to which the navigation grid to which the grid edge area belongs belongs, so as to mark the fall risk area.
[0062] S13: Generate a return point for the fall risk area, and configure a mapping relationship between the fall risk area and the return point, so that when it is detected that the virtual character in the virtual scene falls from the fall risk area, the virtual character is reloaded to the return point.
[0063] The return point (SpawnPoint) can also be called a rebirth point. The return point is a location in the virtual scene that can respond to the character loading command to load the virtual character model. When an abnormal situation occurs in the virtual character, the character loading command will be triggered to reload the virtual character at the location coordinates of the corresponding return point. The abnormal situation includes, for example, the virtual character falling, the virtual character dying, the loading of the virtual character model stuck, etc.
[0064] After determining the fall risk area, one or more return points are generated in the fall risk area, and the mapping relationship between the fall risk area and the return point in the fall risk area is configured, and then the mapping relationship between the return point, the fall risk area, and the fall risk area and the return point is stored under the root node of the area to which the navigation mesh to which the fall risk area belongs belongs. Each area is configured with an area enter trigger (Area Enter Trigger), and when the virtual character enters an area, the area enter trigger that matches the area will be activated. Subsequently, when it is detected that the area enter trigger (Area Enter Trigger) is activated by the virtual character and the virtual character falls, the area that matches it is determined based on the activated area enter trigger, and then the return point under the root node of the area is determined as the target return point, and the virtual character is loaded to the target return point, so that the virtual character returns to the area where he was before the fall.
[0065] In the return point generation method provided in the disclosed embodiment, for any navigation grid, it is determined whether the grid edge area has a falling risk based on the height difference between the grid edge area of the navigation grid and the adjacent grids. If so, the grid edge area is determined as a falling risk area, and then a return point is generated for the falling risk area. In this way, the falling risk area in the virtual scene can be automatically determined, and then the return point is automatically generated for the falling risk area. Compared with the method of manually testing the virtual scene and then manually setting the return point, the efficiency and accuracy of setting the return point are effectively improved.
[0066] Figure 2 A flow chart of a method for generating a return point provided by yet another embodiment of the present invention is shown.
[0067] like Figure 2 As shown, the method includes:
[0068] S21. Generate multiple navigation meshes in the virtual scene.
[0069] The virtual scene contains multiple navigation meshes (Navigation Mesh), which are polygonal mesh data structures that determine walkable paths in the virtual space. Specifically, after the scene model of the virtual scene is built, the navigation mesh can be established based on the virtual scene in the following ways: voxelization (also known as rasterization) is performed on the scene model that can carry virtual characters (such as a surface mesh model); based on the voxelized scene model, the walkable surface of the scene model is filtered out; the walkable surface of the scene model is divided into multiple regions (Regions); based on the multiple regions, the contours of the regions are depicted (Contours); based on the depicted contours, a navigation mesh containing multiple convex polygons (Convex Polygon, Poly Mesh) is generated.
[0070] When determining the scene model that can carry the virtual character, it can be determined whether each scene model in the virtual scene is set with physical collision information, that is, it can be determined whether each scene model in the virtual scene has a collider set and can respond to collision operations (such as walking operations). Further, the scene model with physical collision information is determined as the scene model that can carry the character object, so as to generate a navigation mesh according to the scene model that can carry the character object.
[0071] The virtual scene may be created through a scene editor, for example, by creating a new editor scene (EditorScene), or a portion of an area may be selected in a created virtual scene as a local scene area where a navigation mesh needs to be generated.
[0072] In some examples, before S21, the method for generating a return point provided by the embodiment of the present disclosure further includes: determining the scene area contained in the virtual scene where the navigation mesh needs to be generated. This step is an optional step. For a virtual scene of a smaller scale, the entire virtual scene can be directly used as the scene area where the navigation mesh needs to be generated, thereby omitting this step. For some virtual scenes with larger scene scales, in order to avoid affecting other areas of the scene, this step can be used to pre-set the scene area where the navigation mesh needs to be generated to limit the execution scope of subsequent steps.
[0073] S22: For any navigation grid, emit a detection ray with at least one point in a grid edge region of the navigation grid as a first starting point to detect whether a height difference between the grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold.
[0074] Ray detection is used to detect whether the height difference between a grid edge area of a navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold, wherein the first threshold defines the height difference value that will cause a fall risk, and the value of the first threshold is a natural number greater than 0. The height difference between a grid edge area of a navigation grid and a navigation grid adjacent to the navigation grid refers to the height difference generated in a downward direction perpendicular to the surface of the navigation grid with the height of the surface of the navigation grid as the zero point. Accordingly, the value of the height difference generated in an upward direction perpendicular to the surface of the navigation grid is a negative number.
[0075] Specifically, the detection ray may be divided into two parts, that is, the detection ray includes a first detection sub-ray and a second detection sub-ray. In this case, for any navigation grid, S22 may include the following sub-steps:
[0076] Sub-step 1: using at least one point in the grid edge region as a first starting point and emitting a first detection sub-ray along a first direction to determine whether there is an obstacle in the first direction.
[0077] Among them, the first direction is the horizontal direction, in other words, the first direction is the direction parallel to the surface of the navigation grid, and at least one first detection sub-ray is emitted along the horizontal direction with at least one point in the grid edge area as the first starting point to detect whether there are obstacles in the first direction (for example: walls, buildings, sculptures, etc.). Specifically, if the end of the first detection sub-ray in the first direction touches an obstacle, it means that there is an obstacle at the grid boundary line on the side of the grid edge area corresponding to the navigation grid, and the virtual character cannot step out of the grid boundary line, and further the virtual character will not fall from the grid boundary line; if the end of the first detection sub-ray in the first direction does not touch the obstacle, it means that there is no obstacle at the grid boundary line on the side of the grid edge area corresponding to the navigation grid, and the virtual character can step out of the grid boundary line, so it is necessary to further detect whether the height difference in the vertical direction is greater than the first threshold.
[0078] In this method, the ray parameter [horizontal detection length: Check Drop Out Distance] of the first detection sub-ray in the above sub-step one can be pre-set. The horizontal detection length is used to control the length of the first detection sub-ray extending from the first starting point along the first direction. The specific value can be set as needed and is not limited here.
[0079] Wherein, for a grid edge region of any navigation grid, a first starting point in sub-step 1 may be determined in the following manner:
[0080] Sub-step 1a: Determine any point on any grid edge line of the navigation grid as the initial point.
[0081] Sub-step 1b: moving the initial point a first distance in a direction perpendicular to the navigation grid and away from the navigation grid.
[0082] Taking into account that when constructing the navigation mesh, the colliders of the navigation mesh and the scene model may not completely overlap due to some unavoidable errors, therefore, in order to avoid the first detection sub-ray emitted along the first direction from being interfered by the collider, it is necessary to set the initial point above the surface of the navigation mesh. In other words, the initial point is raised, and the distance of the raised point is the first distance. The value of the first distance is a natural number greater than 0. The specific value can be set as needed and is not limited here.
[0083] In this method, the ray parameters [ray elevation distance: RayUp] of the above-mentioned first detection sub-ray can be set in advance. The ray elevation distance is used to control the distance (i.e., the first distance) that the first detection sub-ray moves in a direction perpendicular to the navigation grid and away from the navigation grid. In other words, by setting the ray elevation distance, the degree of elevation of the first detection sub-ray can be controlled.
[0084] Sub-step 1c: moving the initial point by a second distance along a direction close to the central area of the navigation grid to which the grid edge line belongs, as a first starting point.
[0085] In some examples, the position of the navigation grid corresponding to the first starting point is the position of the set return point, so the first starting point can be moved inward (i.e., in the direction close to the center area of the navigation grid) by a certain distance, so that when the virtual character is reloaded to the return point set according to the first starting point, compared with the embodiment in which the return point is set on the grid boundary line, the virtual character can have a certain walking margin and is not prone to falling again due to misoperation of the walking direction. The second distance is the distance of the walking margin set for the virtual character, and the value of the second distance is a natural number greater than 0. The specific value can be set as needed and is not limited here.
[0086] In the present method, the ray parameters [ray indentation distance: RayIndentation] of the above-mentioned first detection sub-ray can be set in advance. The ray indentation distance is used to control the distance (i.e., the second distance) that the emission starting point (i.e., the initial point) of the first detection sub-ray moves in the direction of the central area of the navigation grid to which the grid edge line belongs. In other words, by setting the ray indentation distance, the position of the emission starting point of the first detection sub-ray can be controlled.
[0087] Through the above method, the position of the first starting point can be accurately controlled, so that in the embodiment of setting the return point according to the first starting point, the detection error caused by the misalignment of the collider and the navigation grid can be avoided, and the return point can be set more accurately to set a certain walking margin for the virtual character.
[0088] In some examples, in sub-step 1, the grid edge region includes multiple first starting points spaced apart from each other, and sub-step 1 is: determining multiple points in the grid edge region as multiple first starting points, and for each first starting point, emitting a first detection sub-ray along the first direction to determine whether there is an obstacle in the first direction. In other words, multiple first detection sub-rays may be emitted in parallel to more accurately detect whether there is an obstacle on the grid boundary line corresponding to the grid edge region.
[0089] Sub-step 2: When it is determined that there is no obstacle in the first direction, a second detection sub-ray is emitted along the second direction with the end of the first detection sub-ray as the second starting point to detect whether the height difference in the second direction is greater than a first threshold.
[0090] The second direction is a vertical direction, in other words, the second direction is a direction perpendicular to the surface of the navigation grid, and the first direction is perpendicular to the second direction. After determining that there are no obstacles in the horizontal direction through the first detection sub-ray, the end of the first detection sub-ray is used as the starting point (second starting point) of the second detection sub-ray, and the second detection sub-ray is emitted in the vertical direction to further determine whether the height between the grid edge area of the navigation grid and the adjacent navigation grid in the vertical direction is too large (i.e., greater than the first threshold). If it is too large, the grid edge area can be determined as a falling risk area.
[0091] Specifically, sub-step 2 includes:
[0092] Sub-step 2a: using the end of the first detection sub-ray as a second starting point and emitting a second detection sub-ray with a length equal to a first threshold along a second direction.
[0093] In this method, the ray parameter [vertical detection length: Drop Height] of the second detection sub-ray in the above sub-step one can be pre-set. The vertical detection length is used to control the length of the second detection sub-ray extending from the second starting point along the second direction (ie, the first threshold). The specific value can be set as needed and is not limited here.
[0094] Sub-step 2b: determining whether the height difference in the second direction is greater than a first threshold value based on whether the end of the second detection sub-ray touches an obstacle.
[0095] Specifically, if the end of the second detection sub-ray touches an obstacle, indicating that the above-mentioned height difference is small, the boundary area between the grid edge area and the adjacent navigation grid is regarded as a normal walking area, and the virtual character will not fall when walking from the grid edge area to the adjacent navigation grid, and can continue to perform walking actions on the surface of the adjacent navigation grid; if the end of the second detection sub-ray does not touch the obstacle, indicating that the above-mentioned height difference is large, the boundary area between the grid edge area and the adjacent navigation grid is regarded as an area where there is a risk of falling, and the grid edge area is further determined as a falling risk area.
[0096] It should be noted that when emitting a detection ray (including a first detection sub-ray and a second detection sub-ray), the emission direction and length of the detection ray can be flexibly configured and are not limited here. For example, the ray direction may include a specified direction corresponding to a preset angle, and the preset angle range is [0°, 360°].
[0097] In some examples, when a grid edge area includes multiple spaced first starting points and multiple first detection sub-rays are emitted in parallel, correspondingly, the number of second detection sub-rays is multiple, and sub-step two is: for the first detection sub-ray that does not detect an obstacle, the second detection sub-ray is emitted along the second direction with the end of the first detection sub-ray as the second starting point, so as to more accurately detect the height difference between different positions of the grid boundary line corresponding to the grid edge area and the adjacent navigation grids.
[0098] It should be noted that S22 is an implementation of S11. Of course, there are other implementations of S11, which are not limited here.
[0099] S23: When a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold, determine the grid edge area as a falling risk area.
[0100] In some examples, when a plurality of first starting points spaced apart from each other are included in a grid edge region and a plurality of first detection sub-rays and a plurality of second detection sub-rays are emitted in parallel, the range of the fall risk region can be adjusted according to the detection results of the plurality of second detection sub-rays. Specifically, among the plurality of second detection sub-rays, a sub-region matched by a first starting point corresponding to a second detection sub-ray whose height difference is detected to be greater than a first threshold is determined as a fall risk region.
[0101] S24. Divide the falling risk area into multiple sub-areas, and determine at least two sub-areas as return areas.
[0102] In the process of implementing the present invention, the inventors also found that the grid edge area of the navigation grid has a certain length, and accordingly, the fall risk area also has a certain length. The virtual character may fall at different locations in the fall risk area. If only one return point is set in a fall risk area, the virtual character that falls from a location far away from the return point still needs to walk a long distance to return to the position before the fall after being reloaded to the return point. In order to solve this problem, the fall risk area can be divided into multiple sub-areas, at least two of which are determined as return areas, and then the return point is generated according to the return area.
[0103] Specifically, dividing the fall risk area into a plurality of sub-areas includes at least one of the following:
[0104] (1) According to the terrain distribution characteristics of the fall risk area, the fall risk area is divided into multiple sub-areas.
[0105] (2) According to the area of the fall risk area, the fall risk area is divided into multiple sub-areas.
[0106] (3) According to the loading frequency of the fall risk area, the fall risk area is divided into multiple sub-areas.
[0107] Regarding (1), specifically, the terrain distribution features include at least one of the following: the location of terrain protrusions, the location of terrain depressions, the distribution of surface materials, etc. Among them, in some special locations, such as terrain protrusions (e.g., mountain peaks), terrain depressions (e.g., deep pits), or the locations of some surface materials (e.g., quicksand materials, swamp materials), it is not suitable to set the return point. Therefore, when dividing the sub-areas, the above special locations can be divided into a sub-area separately, or when dividing the sub-areas, the area where the above special locations are located can be excluded to avoid setting the return point at the above special locations.
[0108] It should be noted that the terrain distribution characteristics can be determined by the grid attribute information of the plot grid to which the fall risk area belongs, and the grid attribute information includes the terrain distribution characteristics.
[0109] Regarding (2), specifically, the size of the fall risk area can be referred to and the sub-areas can be divided in combination with the virtual character's step length to ensure that a return point is set within each preset walking distance to reduce the walking distance between the virtual character's return point and the position before the fall.
[0110] Regarding (3), specifically, the loading frequency of the fall risk area is determined according to the frequency with which the plot grid to which the fall risk area belongs is loaded in response to the walking operation of the virtual character. In other words, according to the frequency with which the virtual character passes through the fall risk area (i.e., the loading frequency), the fall risk area is divided into multiple sub-areas. Accordingly, the area of the sub-area corresponding to the position with a high loading frequency in the fall risk area is larger than the area of the sub-area corresponding to the position with a low loading frequency.
[0111] In addition, in the embodiment of determining the height difference by radiographic detection, dividing the fall risk area into a plurality of sub-areas may further include:
[0112] (4) Based on the detection results of the detection rays, the fall risk area is divided into multiple sub-areas.
[0113] Specifically, in an embodiment where a plurality of first starting points spaced apart from each other in the grid edge region are used to emit a plurality of first detection sub-rays and a plurality of second detection sub-rays in parallel, the fall risk region may be divided into a plurality of sub-regions according to the detection results of the plurality of second detection sub-rays. Specifically, in this case, S22 includes:
[0114] Sub-step 1: determine a plurality of equally spaced points in the grid edge region as first starting points, and for each first starting point, emit a first detection sub-ray along a first direction to determine whether there is an obstacle in the first direction.
[0115] Sub-step 2: for the first detection sub-ray that detects no obstacle, a second detection sub-ray is emitted along a second direction with the end of the first detection sub-ray as a second starting point to detect whether the height difference in the second direction is greater than a first threshold.
[0116] Then the above (4) specifically includes: determining the area around the first starting point corresponding to the second detection sub-ray detected in the plurality of second detection sub-rays with a height difference greater than the first threshold as a sub-region. The area around the first starting point can be a rectangular area with the first starting point as the symmetry center and a diagonal length as a preset length. One first starting point corresponds to one sub-region.
[0117] Furthermore, after dividing the multiple sub-areas, at least two return areas can be determined in the multiple sub-areas according to the above factors. Determining at least two sub-areas as return areas includes at least one of the following:
[0118] (1) According to the terrain distribution characteristics of the fall risk area, at least two sub-areas among the multiple sub-areas are determined as return areas.
[0119] Specifically, sub-regions that are not special locations are determined as return areas based on terrain distribution characteristics. Special locations include, for example, terrain protrusions (e.g., mountain peaks), terrain depressions (e.g., deep pits), or locations where some surface materials (e.g., quicksand materials, swamp materials) are located. These locations are not suitable for setting return points.
[0120] (2) According to the loading frequency of the fall risk area, at least two sub-areas among the multiple sub-areas are determined as return areas.
[0121] Specifically, a sub-area with a loading frequency higher than a preset threshold is determined as a return area, so that a return point can be set preferentially for plots with a high loading frequency, thereby reducing the amount of data storage.
[0122] (3) According to the detection result of the detection ray, at least two sub-areas among the multiple sub-areas are determined as return areas.
[0123] Specifically, the sub-region corresponding to the detection ray whose detection result is that the height difference is greater than the first threshold is determined as the return region.
[0124] In some examples, the above points may also be combined to divide the fall risk area into multiple sub-areas, or determine at least two sub-areas among the multiple sub-areas as return areas.
[0125] S25, generating a return point for each return area respectively, and configuring a mapping relationship between each return area and each return point, so as to reload the virtual character to the corresponding return point when it is detected that the virtual character in the virtual scene falls from the return area.
[0126] A return point is generated in each return area, and a mapping relationship between the return point and the return area is configured, and the mapping relationship is stored under the root node of the area to which the navigation grid to which the return area belongs belongs. In some examples, a mapping relationship between the return point (i.e., the return point coordinates), the return area (i.e., the return area vertex coordinates), the return point and the return area can be generated, and the mapping relationship is stored under the root node of the area to which the navigation grid to which the return area belongs belongs.
[0127] When building a virtual scene, different scene models have corresponding bounding boxes to distinguish each scene model from the graphics. Based on this, in this method, the area to which the return point belongs can be determined according to the following method:
[0128] Sub-step 1: Determine the bounding box to which the returned point belongs, and determine the area to which the bounding box belongs.
[0129] Sub-step 2: Determine the area to which the bounding box belongs as the area to which the returned point belongs.
[0130] Among them, since different bounding boxes may overlap, that is, a return point may be included in multiple bounding boxes, in this case, the area to which the bounding box occupied by the return point has the largest area is determined to be the area to which the return point belongs.
[0131] Among them, each area is configured with an Area Enter Trigger. When the virtual character enters an area, the Area Enter Trigger matching the area will be activated. Later, when it is detected that the Area Enter Trigger is activated by the virtual character and the virtual character falls, the area matching it is determined according to the activated Area Enter Trigger, and then according to the position coordinates of the virtual character before falling, the return point closest to the position coordinates in the root directory of the area is determined as the target return point, and the virtual character is loaded to the target return point, so that the virtual character returns to the area where it was before falling.
[0132] It should be noted that S24 and S25 are one implementation of S13. Of course, there are other implementations of S13, which are not limited here.
[0133] Further, in an embodiment where the height difference is determined by ray detection, when the height difference is greater than a first threshold and the grid edge area is determined as a fall risk area, generating a return point for the fall risk area in S25 includes:
[0134] Sub-step A: Generate a return point on the surface of the fall risk area corresponding to the first starting point.
[0135] Wherein, sub-step A comprises:
[0136] Sub-step a: starting from the first starting point as a reference point, emitting a detection ray in a direction perpendicular to the navigation grid and close to the navigation grid.
[0137] That is, the detection ray is vertically emitted downwards with the first starting point as the reference point, in other words, the orthographic projection of the first starting point on the surface of the navigation grid is determined. The method for determining the first starting point is as described above and will not be repeated here.
[0138] In this method, the ray parameter [Ground detection length: Ray Down Found Ground] of the first detection sub-ray in the above sub-step one can be pre-set. The ground detection length is used to control the length of the detection ray used to detect the ground below the first starting point. The specific value can be set as needed and is not limited here.
[0139] Sub-step b: when it is detected that the detection ray contacts the surface of the navigation grid, a return point is generated at the location where the two contact.
[0140] That is, a return point is generated at the orthographic projection of the surface of the navigation mesh at the first starting point.
[0141] S26. Determine the terrain attributes of the falling risk area at the return point.
[0142] The terrain attribute includes at least one of the following: surface material type and surface shape type.
[0143] Specifically, the terrain attributes included in the grid attribute information of the navigation grid can be used. The terrain attributes include: surface material type, surface shape type, etc. The surface material type includes at least one of the following: hard sand type, soft sand type, river type, grassland type, etc.; the surface shape type includes: mountain top type, flat land type, etc.
[0144] S27. Configure a return posture attribute that matches the return point according to the terrain attributes.
[0145] Specifically, the corresponding return posture attribute can be set according to the terrain attribute of the location of the return point. For example, when the surface material type is a river type, the return posture attribute is a swimming posture; for example, when the surface shape type is a mountain top type, the return posture attribute is a posture of standing with both feet together. Of course, there are more matching methods, which are not limited here.
[0146] In some examples, considering that some virtual scenes have a simulated terrain change system, the terrain attributes will change over time, so the return posture attributes can be dynamically configured. In this case, S26 includes: determining the terrain attributes of the fall risk area at the return point in real time. Accordingly, S27 includes: dynamically configuring the return posture attributes matching the return point according to the terrain attributes obtained in real time.
[0147] Furthermore, the return posture attribute includes one of the following: character orientation, character action, and character status. According to different terrain attributes at the return point, the specific posture details of the virtual character loaded at the return point can be configured, such as the orientation of the virtual character, the action of the virtual character, and the status of the virtual character. Among them, the character action and the character status can be dynamically configured according to the character type of the virtual character. The character status includes: health status, element status, etc.
[0148] It should be noted that S26 and S27 are optional steps and may be omitted in some embodiments.
[0149] In the return point generation method provided in the disclosed embodiment, for any navigation grid, it is determined whether the grid edge area has a falling risk based on the height difference between the grid edge area of the navigation grid and the adjacent grids. If so, the grid edge area is determined as a falling risk area, and then a return point is generated for the falling risk area. In this way, the falling risk area in the virtual scene can be automatically determined, and then the return point is automatically generated for the falling risk area. Compared with the method of manually testing the virtual scene and then manually setting the return point, the efficiency and accuracy of setting the return point are effectively improved; and sub-areas are divided according to various factors, and then some areas in the sub-areas are selected as return points. Therefore, the return point can be flexibly set according to different factors, making the setting of the return point more accurate.
[0150] Figure 3 A return point generation device provided by another embodiment of the present invention is shown, which is applied in a virtual scene including multiple navigation grids, and includes:
[0151] A first determining module 101 is used to determine, for any navigation grid, whether a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold;
[0152] A second determination module 102, configured to determine the grid edge area as a fall risk area when the height difference is greater than a first threshold;
[0153] The generation module 103 is used to generate a return point for the fall risk area and configure a mapping relationship between the fall risk area and the return point so that when a virtual character in a virtual scene is detected to fall from the fall risk area, the virtual character is reloaded to the return point.
[0154] In some examples, the generating module 103 is specifically used to:
[0155] Divide the fall risk area into a plurality of sub-areas, and identify at least two of the sub-areas as return areas;
[0156] A return point is generated for each return area respectively, and a mapping relationship between each return area and each return point is configured, so that when a virtual character in a virtual scene is detected to fall from a return area, the virtual character is reloaded to the corresponding return point.
[0157] In some examples, the generating module 103 is specifically used to:
[0158] According to the terrain distribution characteristics of the fall risk area, the fall risk area is divided into multiple sub-areas;
[0159] According to the area of the falling risk area, the falling risk area is divided into multiple sub-areas; according to the loading frequency of the falling risk area, the falling risk area is divided into multiple sub-areas.
[0160] In some examples, the first determining module 101 is specifically configured to:
[0161] emitting a detection ray from at least one point in a grid edge region of the navigation grid as a first starting point to detect whether a height difference between the grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold;
[0162] When the height difference is greater than the first threshold and the grid edge area is determined as a falling risk area, the generating module 103 is specifically configured to: generate a return point on the surface of the falling risk area corresponding to the first starting point.
[0163] In some examples, the detection ray includes a first detection sub-ray and a second detection sub-ray; the first determination module 101 is specifically used to:
[0164] Taking at least one point in the grid edge region as a first starting point and emitting a first detection sub-ray along a first direction to determine whether there is an obstacle in the first direction;
[0165] When it is determined that there is no obstacle in the first direction, the end of the first detection sub-ray is used as the second starting point and the second detection sub-ray is emitted along the second direction to detect whether the height difference in the second direction is greater than a first threshold; wherein the first direction and the second direction are perpendicular.
[0166] In some examples, the first determining module 101 is specifically configured to:
[0167] Taking the end of the first detection sub-ray as a second starting point and emitting a second detection sub-ray with a length equal to a first threshold along a second direction;
[0168] It is determined whether the height difference in the second direction is greater than a first threshold value according to whether the end of the second detection sub-ray touches the obstacle.
[0169] In some examples, for a grid edge region of any navigation grid, a first starting point is determined by:
[0170] Determine any point on any grid edge line of the navigation grid as an initial point;
[0171] Moving the initial point by a first distance in a direction perpendicular to the navigation grid and away from the navigation grid;
[0172] The initial point is moved by a second distance in a direction close to a central area of the navigation grid to which the grid edge line belongs, as a first starting point.
[0173] In some examples, the generating module 103 is specifically used to:
[0174] Taking the first starting point as a reference point, emitting a detection ray in a direction perpendicular to the navigation grid and close to the navigation grid;
[0175] When it is detected that the probe ray contacts the surface of the navigation mesh, a return point is generated at the location where the two contact.
[0176] In some examples, a return point is generated for the fall risk area, and a mapping relationship between the fall risk area and the return point is configured, so that when a virtual character in the virtual scene is detected to fall from the fall risk area, the apparatus further includes:
[0177] A terrain attribute determination module, used to determine the terrain attributes of the fall risk area at the return point;
[0178] A configuration module, used for configuring a return posture attribute matching the return point according to a terrain attribute;
[0179] The terrain attribute includes at least one of the following: surface material type, surface shape type; the return posture attribute includes one of the following: character orientation, character action, and character status.
[0180] In the return point generation device provided in the disclosed embodiment, for any navigation grid, it is judged whether the grid edge area has a falling risk based on the height difference between the grid edge area of the navigation grid and the adjacent grids. If so, the grid edge area is determined as a falling risk area, and then a return point is generated for the falling risk area. In this way, the falling risk area in the virtual scene can be automatically determined, and then the return point is automatically generated for the falling risk area. Compared with the method of manually testing the virtual scene and then manually setting the return point, the efficiency and accuracy of setting the return point are effectively improved.
[0181] Another embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction, which can execute the return point generation method in any of the above method embodiments. The executable instruction can be specifically used to enable the processor to execute the corresponding operations in the above method embodiments.
[0182] Figure 4 A schematic structural diagram of an electronic device according to another embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0183] like Figure 4 As shown, the electronic device may include: a processor (processor) 502 , a communication interface (Communications Interface) 506 , a memory (memory) 504 , and a communication bus 508 .
[0184] in:
[0185] The processor 502 , the communication interface 506 , and the memory 504 communicate with each other via a communication bus 508 .
[0186] The communication interface 506 is used to communicate with other devices such as clients or other servers.
[0187] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned embodiment of the method for generating a return point.
[0188] Specifically, the program 510 may include program codes, which include computer operation instructions.
[0189] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs. They may also be processors of different types, such as one or more CPUs and one or more ASICs.
[0190] The memory 504 is used to store the program 510. The memory 504 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0191] The program 510 may be specifically used to enable the processor 502 to execute the corresponding operations in the above-mentioned return point generation method embodiment.
[0192] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general-purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for the purpose of disclosing the best mode of the present invention.
[0193] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0194] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0195] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0196] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the claimed embodiments may be used in any combination.
[0197] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to an embodiment of the present invention. The present invention may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0198] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A method for generating a return point, applied in a virtual scene including a plurality of navigation grids, the method comprising: For any navigation grid, determining whether a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold; When the height difference is greater than the first threshold, determining the grid edge area as a falling risk area; A return point is generated for the fall risk area, and a mapping relationship between the fall risk area and the return point is configured so that when it is detected that the virtual character in the virtual scene falls from the fall risk area, the virtual character is reloaded to the return point.
2. The method according to claim 1, wherein: The generating a return point for the fall risk area and configuring a mapping relationship between the fall risk area and the return point so as to reload the virtual character to the return point when it is detected that the virtual character in the virtual scene falls from the fall risk area comprises: Dividing the fall risk area into a plurality of sub-areas, and determining at least two sub-areas as return areas; A return point is generated for each return area respectively, and a mapping relationship between each return area and each return point is configured, so that when it is detected that the virtual character in the virtual scene falls from the return area, the virtual character is reloaded to the corresponding return point.
3. The method according to claim 2, wherein: Dividing the fall risk area into a plurality of sub-areas comprises at least one of the following: Dividing the fall risk area into a plurality of sub-areas according to the terrain distribution characteristics of the fall risk area; Dividing the fall risk area into a plurality of sub-areas according to the area of the fall risk area; The fall risk area is divided into a plurality of sub-areas according to a loading frequency of the fall risk area.
4. The method according to any one of claims 1 to 3, wherein: The determining, for any navigation grid, whether a height difference between a grid edge area of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold comprises: emitting a detection ray with at least one point in the grid edge region of the navigation grid as a first starting point to detect whether a height difference between the grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold; When the height difference is greater than the first threshold and the grid edge area is determined as a falling risk area, generating a return point for the falling risk area includes: generating a return point on the surface of the falling risk area corresponding to the first starting point.
5. The method according to claim 4, wherein: The detection ray includes a first detection sub-ray and a second detection sub-ray; and emitting the detection ray with at least one point in the grid edge area of the navigation grid as a first starting point includes: Taking at least one point in the edge area of the grid as a first starting point and emitting a first detection sub-ray along a first direction to determine whether there is an obstacle in the first direction; When it is determined that there is no obstacle in the first direction, the end of the first detection sub-ray is used as the second starting point and the second detection sub-ray is emitted along the second direction to detect whether the height difference in the second direction is greater than a first threshold; wherein the first direction and the second direction are perpendicular; The end of the first detection sub-ray is determined according to a horizontal detection length included in the ray parameters of the first detection sub-ray, and the horizontal detection length is used to control the length of the first detection sub-ray extending from the first starting point along the first direction.
6. The method according to claim 5, wherein: The step of taking the end of the first detection sub-ray as the second starting point and emitting the second detection sub-ray along the second direction to detect whether the height difference in the second direction is greater than the first threshold comprises: Taking the end of the first detection sub-ray as the second starting point and emitting a second detection sub-ray with a length equal to the first threshold along a second direction; Determining whether the height difference in the second direction is greater than a first threshold value according to whether the end of the second detection sub-ray touches an obstacle; The end of the second detection sub-ray is determined according to a vertical detection length included in the ray parameters of the second detection sub-ray, and the vertical detection length is used to control the length of the second detection sub-ray extending from the second starting point along the second direction.
7. The method according to claim 4, wherein: For a grid edge area of any navigation grid, a first starting point is determined by: Determine any point on any grid edge line of the navigation grid as an initial point; Moving the initial point by a first distance in a direction perpendicular to the navigation grid and away from the navigation grid; The initial point is moved by a second distance in a direction approaching a central area of the navigation grid to which the grid edge line belongs, as the first starting point.
8. The method according to claim 7, wherein: Generating a return point on the surface of the fall risk area corresponding to the first starting point includes: Taking the first starting point as a reference point, emitting a detection ray in a direction perpendicular to the navigation grid and close to the navigation grid; When it is detected that the detection ray contacts the surface of the navigation grid, the return point is generated at the contact position between the two.
9. The method according to any one of claims 1 to 3, wherein: After generating a return point for the fall risk area and configuring a mapping relationship between the fall risk area and the return point so that, when a virtual character in the virtual scene is detected to fall from the fall risk area, the virtual character is reloaded to the return point, the method further includes: determining a terrain attribute of the fall risk area at the return point; Configure a return posture attribute that matches the return point according to the terrain attribute; The terrain attribute includes at least one of the following: surface material type, surface shape type; the return posture attribute includes one of the following: character orientation, character action, character status.
10. A return point generation device, applied in a virtual scene containing multiple navigation grids, comprising: a first determining module, configured to determine, for any navigation grid, whether a height difference between a grid edge region of the navigation grid and a navigation grid adjacent to the navigation grid is greater than a first threshold; A second determining module, configured to determine the grid edge area as a falling risk area when the height difference is greater than the first threshold; A generation module is used to generate a return point for the fall risk area and configure a mapping relationship between the fall risk area and the return point so that when it is detected that the virtual character in the virtual scene falls from the fall risk area, the virtual character is reloaded to the return point.
11. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the method according to any one of claims 1-9.
12. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute the method according to any one of claims 1 to 9.
