I’m having another issue with getRandomPointAround (thanks for the seed fix btw @Cedric ). I have this code:
console.log('centerPoint', centerPoint, 'radius', radius);
const nextPosition = window.navigationPlugin.getRandomPointAround(centerPoint, radius);
console.log('nextPosition', nextPosition);
And here is what it logs:
wanderer.system.ts:70 centerPoint Vector3 {_isDirty: true, _x: 15, _y: 1, _z: -15} radius 1
wanderer.system.ts:72 nextPosition Vector3 {_isDirty: true, _x: -24.392005920410156, _y: 0.5, _z: -295.0232238769531}
Unless I’m misunderstanding the point of this method, this position it’s generating does not seem right.
Here are my nav mesh parameters in case they’re relevant:
navMeshParams: {
cs: 5,
ch: 0.5,
walkableSlopeAngle: 0,
walkableHeight: 4,
walkableClimb: 0,
walkableRadius: 1,
maxEdgeLen: 12,
maxSimplificationError: 0.5,
minRegionArea: 3,
mergeRegionArea: 5,
maxVertsPerPoly: 6,
detailSampleDist: 6,
detailSampleMaxError: 1,
},