16
Add-ons and Extensions / Re: 2D Platform Controller
« on: July 24, 2013, 01:23:44 pm »
2 questions. Does this work with tilemaps? Also does it use tk2dCamera or a standard camera?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
// Get the tilemaps' collider layers' mesh
Mesh mesh = mapData.Layers[1].GetChunk(0,0).colliderMesh;
// Create a new mesh graph
NavMeshGraph newMeshGroup = new NavMeshGraph();
newMeshGroup.sourceMesh = mesh;
// Add it
aStar.astarData.AddGraph( newMeshGroup );