Learning to use recast, python version

63 views
Skip to first unread message

Michael

unread,
Dec 28, 2023, 3:14:33 AM12/28/23
to recastnavigation
Hi everyone
I'm wanting to learn how to use Recast Detour library, I feel more comfortable learning it using Python language
https://github.com/Tugcga/PyRecastDetour,

My map is 512 by 512 pixels. My sprite is 8 by 12,

I have x, y and width and height corrds for two blocks
160 112 48 48
200 112 48 48

I'm aware i need to convert these coords to vertices, but I'm not sure what should be default parameters for the config settings, I've search the mail list and checked the CPP code, but it's not clicking.
Can someone please kindly tell me what the parameters should be for 2D geometry? Alternatively, point me to an example that uses 2D geometry.
cellSize - cell size in world units, should be >= 0.0001
cellHeight - cell height in world units, should be >= 0.0001
agentHeight - agent height in world units, should be >= 0.0
agentRadius - agent radius in world units, should be >= 0.0
agentMaxClimb - agent max climb in world units
agentMaxSlope - agent max slope in degrees
regionMinSize - region minimum size in voxels
regionMergeSize - region merge size in voxels
edgeMaxLen - eEdge max length in world units
edgeMaxError - edge max error in voxels
vertsPerPoly - the maximum number of vertices in each polygon, should be integer from 3 to 6
detailSampleDist - detail sample distance in voxels
detailSampleMaxError - detail sample max error in voxel heights

Thanks
Michael

Graham Pentheny

unread,
Jan 17, 2024, 3:20:49 PMJan 17
to recastna...@googlegroups.com
Hi Michael,
  There is no official python version of Recast, so any issues regarding that should be directed to whomever is maintaining that library.  Also, Recast is a 3D library so it's likely not going to work out of the box for your 2D use cases without some finagling.  Regarding the input parameters, you can reference the rcConfig docs here for more info on what each do: http://recastnav.com/structrcConfig.html or check out the sample code in RecastDemo: https://github.com/recastnavigation/recastnavigation/blob/main/RecastDemo/Source/Sample_SoloMesh.cpp

Best,
Graham

--

---
You received this message because you are subscribed to the Google Groups "recastnavigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recastnavigati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/recastnavigation/0d20b924-1db2-4a57-bda5-4b7644365e36n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages