Littlefat1213 Posted April 18, 2023 Share Posted April 18, 2023 (edited) the Pathfinder is a c++ side component and here's the methods provided: GetPathTileIndexFromPoint function: 00000000523FCEA0 AddWall function: 00000000523FC5A0 IsClear function: 00000000523FCD20 HasWall function: 00000000523FC4A0 KillSearch function: 00000000523FC7A0 GetSearchResult function: 00000000523FCB60 GetSearchStatus function: 00000000523FCDE0 RemoveWall function: 00000000523FCC20 SubmitSearch function: 00000000523FCA20 as far as i know, the function IsClear(p1x,p1y,p1z,p2x,p2y,p2z,pathcaps) return true if from the point1 i can walk straight through to point2(or called has line of sight), and return false if no land tile connection between points or some obstacle blocked which has been registered via pathfinder:AddWall i test the points of player's position and the point at cursor in console with this code: local pt = ThePlayer:GetPosition(); local ct = TheInput:GetWorldPosition(); print(TheWorld.Pathfinder:IsClear(pt.x,pt.y,pt.z,ct:Get())) i discover a strange issue when the tiles only connected with diagonal direction just like this picture, the IsClear function return false,I think it's counterintuitive, is that a expected result? Edited April 18, 2023 by Littlefat1213 Link to comment https://forums.kleientertainment.com/forums/topic/147232-the-issue-about-pathfinderisclear-on-tile-connection-in-diagonal-direction/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now