Skip to content

Commit 730f5f1

Browse files
albertvanveenisaac-mason
authored andcommitted
Update README.md for PlayCanvas
Fixed example code by changing 'add' to 'addChild', since 'add' doesn’t exist in the PlayCanvas Entity API.
1 parent f716df9 commit 730f5f1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/recast-navigation-playcanvas

‎packages/recast-navigation-playcanvas/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ await init();
4040

4141
### Generating a NavMesh
4242

43-
This package provides convenience functions for generating nav meshes from playcanvas MeshInstance objects.
43+
This package provides convenience functions for generating nav meshes from PlayCanvas MeshInstance objects.
4444

4545
```ts
4646
import { init } from 'recast-navigation';
@@ -77,7 +77,7 @@ This library provides helpers that are used in conjunction with the core library
7777

7878
### Helpers
7979

80-
This package provides helpers for visualizing various recast-navigation objects in playcanvas.
80+
This package provides helpers for visualizing various recast-navigation objects in PlayCanvas.
8181

8282
#### `NavMeshHelper`
8383

@@ -86,7 +86,7 @@ import { NavMeshHelper } from '@recast-navigation/playcanvas';
8686

8787
const navMeshHelper = new NavMeshHelper(navMesh, graphicsDevice);
8888

89-
this.entity.add(navMeshHelper);
89+
this.entity.addChild(navMeshHelper);
9090

9191
// update the helper when the navmesh changes
9292
navMeshHelper.update();
@@ -101,7 +101,7 @@ import { TileCacheHelper } from '@recast-navigation/playcanvas';
101101

102102
const tileCacheHelper = new TileCacheHelper(tileCache);
103103

104-
this.entity.add(tileCacheHelper);
104+
this.entity.addChild(tileCacheHelper);
105105

106106
// update the helper after adding or removing obstacles
107107
tileCacheHelper.update();
@@ -116,7 +116,7 @@ import { CrowdHelper } from '@recast-navigation/playcanvas';
116116

117117
const crowdHelper = new CrowdHelper(crowd, graphicsDevice);
118118

119-
this.entity.add(crowdHelper);
119+
this.entity.addChild(crowdHelper);
120120

121121
// update the helper after updating the crowd
122122
crowdHelper.update();

0 commit comments

Comments
 (0)