In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The first kind of simple pathfinding ground contact. You can walk all the way to the target point without jumping.
Simply set up a few objects in the scene view. Figure 1
The capsule is the pathfinder, the yellow ball is the target red floor, and the green obstacle.
Now select the floor and obstacles and set the static to Navigation Static in the inspector panel as shown in figure 2
Then the menu bar selects the window Window-Navigation
Then select All-Bake to bake as shown in the figure.
There are three page parameters that can adjust the baking effect, which are explained in the Bible.
Note that both the capsule and the target are baked in a blue grid. Otherwise, you can adjust the baking size by adjusting the parameters on the second page.
Then add navigation components to the capsule.
Menu bar Component-Navigation-Nav Mesh Agent
See Scripture for details of component parameters.
Then add the code to the capsule, as shown in the figure
Aa is the target. Give the ball to aa in the inspector panel. The simple path finding can be realized by running. As shown in the picture
The second kind of pathfinding is discontinuous and can be found by jumping.
First set up a simple scene as shown in the picture. If you jump, you must add three springboards as shown in the picture.
Set the ground and the high platform (green) together to Navigation Static
Add a component Component-Navigation-Off Mesh Link to the middle springboard, which has several properties start and end, which is the take-off position and landing position, just drag the two springboards with the mouse. The addition of pathfinding components to the capsule is the same as the first. Add a script. It's the same script. After all the components are selected, bake is the last choice.
Select both of the following properties of All when baking.
When baking, as shown in the picture, there is sometimes a circle in the above picture that is not baked, because the capsule enters the ground too much. You can move the capsule to the blue grid and run it. The system cannot be realized if the above steps are left behind. Just be careful.
The smaller the Agent Radius proxy radius is, the larger the area of the mesh is, and the closer it is to the edge of the static object.
Agent Height proxy height
The height of a step raised by a Max Slope object
Maximum allowable falling distance of Drop Height
Maximum jump distance allowed by Jump Height
Radius proxy escape radius Height proxy passes through the target height under the obstacle
Base Offset offset distance
Steering operation instruction
Maximum moving speed of Speed agent Angular Speed angular speed
Acceleration maximum acceleration the distance between Stopping Distance and the target when it stops (what is the distance from the target)
Auto Braking whether the agent brakes automatically to avoid exceeding the destination
Troubleshooting obstacle avoidance
Quality quality Priority priority
Searching for Path Finding path.
Auto Traverse Off Mesh Link does the agent automatically traverse the Off Mesh Links?
Off-mesh connections are used to connect navigation grids in disjoint areas. In general, when this property is set to true, the character should be able to pass or cross the connection automatically. However, it can also be set to false when a special mind control movement is required.
Auto Repath automatically updates the path (for example, if the target location changes, the path needs to be updated again)
Area Mask area occlusion (the agent's action area, where to go. Default Everthing anywhere)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.