Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Methods of using the pathfinding service for arial pathfinding?

Asked by
Edenojack 171
8 years ago

So far the only method I can think of is creating a path and then shooting rays above and below it to find its ceiling and floor heights, but this may prove fairly expensive. Are there any alternative methods to utilizing the Y axis more with pathfinding?

0
additional thought is creating a nodegraph and translating that into a 4x4 map. Edenojack 171 — 8y
0
Attempted the above, however the logistics of this don't seem to add up. Edenojack 171 — 8y

1 answer

Log in to vote
0
Answered by
Edenojack 171
8 years ago

If anyone is still interested in this, I've opted to utilize a few things; When the player, or point of interest was last "seen", casting a ray and then if that position is no longer visible to the NPC, moving the NPC to that position, Lerping the height, I cast two rays to find the roof and floor, creating the maximum a Y position can be at, and the minimum. I then apply this information to create the Y height for a BodyPosition that can only dictate the Y position. Humanoid:MoveTo. Is incredibly useful. I owe it my firstborn.

Instead of constantly trying to move the NPC's Y height to the point of interest's height, I instead take the WalkToPoint. This compromize does lead to some annoyances. For example, when two points are slightly above one another and a corner hinders the NPC's path. The bodyposition's Y will change to reach it, however the friction between the NPC torso and the corner can cease its movement near indefinatley.

Ad

Answer this question