@Evgeni_Popov Thanks, I’ll look into that post.
@jeremy-coleman I will look into both of those points, thanks!
Even if I dont think there is any issue loading the navmesh, as I have can echo all of the regions, centroid, etc… The issue is that from what I can see, is that the navmesh is all wrong and is not where it’s suppose to be.
For example, in all teh test below, you can see the navmesh is return weird numbers: the y axis should be at zero, no? as my navmesh is flat, it should only have 2 axis?
----------- TEST 1---------------
`let test = this._gameroom.navMesh.getRandomRegion(); console.log(test);`
gives more sensible results, but the Y axis should not be higher than 1?:
centroid: Vector3 {
x: -11.88888963063558,
y: 5.9604641222676946e-8,
z: 0.8888889948527018
},
centroid: Vector3 {
x: 7.222222328186035,
y: 5.9604641222676946e-8,
z: -9.777779261271158
},
-------------- TEST 2 -------------
Another debug test, after creating a vehicule on the server
`
this.entityManager = new EntityManager();
this.time = new Time()
let id = nanoid();
const vehicle = new Vehicle()
vehicle._uuid = id;
vehicle.name = "rat";
vehicle.rotation.fromEuler(0, 2 * Math.PI * Math.random(), 0);
vehicle.position.x = 1;
vehicle.position.y = 1;
vehicle.position.z = 1;
const wanderBehavior = new WanderBehavior()
vehicle.steering.add(wanderBehavior)
this.entityManager.add(vehicle)`
and then in my update function
`const delta = this.time.update().getDelta(); this.entityManager.update(delta);`
with a console.log, my vehicle position is way out of the bounds.
`position: Vector3 { x: -1647608072.1801252, y: 1, z: 277497351.3185711 }, rotation: Quaternion { x: 0, y: 0.4561747218779746, z: 0, w: 0.8898902309383739 },`
----------TEST 3--------------
console log results of navmesh.regions[x].centroid
it's weird, I would have assumed only two axis would be used....?
Vector3 {
x: 12.055556615193685,
y: 5.9604641222676946e-8,
z: 3.888888676961263
}
Vector3 {
x: 11.277779897054037,
y: 5.9604641222676946e-8,
z: 3.888888676961263
}
Vector3 {
x: 12.055553436279297,
y: 5.9604641222676946e-8,
z: 7.277777671813965
}
Vector3 {
x: 12.277776718139648,
y: 5.9604641222676946e-8,
z: 6.722222010294597
}
Vector3 {
x: 6.44444465637207,
y: 5.9604641222676946e-8,
z: 7.722222010294597
}
Vector3 {
x: 11.833333333333334,
y: 5.9604641222676946e-8,
z: 6.05555534362793
}
Vector3 {
x: 11.944443384806315,
y: 5.9604641222676946e-8,
z: 7.722222010294597
}
Vector3 {
x: 10.722223281860352,
y: 5.9604641222676946e-8,
z: 4.05555534362793
}
Vector3 {
x: 7.333333333333333,
y: 5.9604641222676946e-8,
z: 2.1111110051472983
}
Vector3 {
x: 3.1666666666666665,
y: 5.9604641222676946e-8,
z: 4.722222010294597
}
Vector3 {
x: 6.333333333333333,
y: 5.9604641222676946e-8,
z: 7.222222010294597
}
Vector3 {
x: -16.722222646077473,
y: 5.9604641222676946e-8,
z: 0.5555556615193685
}
Vector3 {
x: -11.88888963063558,
y: 5.9604641222676946e-8,
z: 0.8888889948527018
}
Vector3 {
x: -11.555556297302246,
y: 5.9604641222676946e-8,
z: 1.4444446563720703
}
Vector3 {
x: -16.38888931274414,
y: 5.9604641222676946e-8,
z: 3.722222328186035
}
Vector3 {
x: -9.222222646077475,
y: 5.9604641222676946e-8,
z: 5.777777671813965
}
Vector3 {
x: -3.722222646077474,
y: 5.9604641222676946e-8,
z: 3.722222328186035
}
Vector3 {
x: -2.722222646077474,
y: 5.9604641222676946e-8,
z: 0.3333333333333333
}
Vector3 {
x: -3.055555979410807,
y: 5.9604641222676946e-8,
z: 0.8888889948527018
}
Vector3 {
x: -1.6666666666666667,
y: 5.9604641222676946e-8,
z: 3.1666666666666665
}
Vector3 {
x: 11.388888994852701,
y: 5.9604641222676946e-8,
z: -4.333334287007649
}
Vector3 {
x: 10.166666984558105,
y: 5.9604641222676946e-8,
z: -4.444445292154948
}
Vector3 {
x: 7.111111323038737,
y: 5.9604641222676946e-8,
z: -5.555556615193685
}
Vector3 {
x: 4.166666666666667,
y: 5.9604641222676946e-8,
z: -3.27777894337972
}
Vector3 {
x: 7.222222328186035,
y: 5.9604641222676946e-8,
z: -9.777779261271158
}
Vector3 {
x: 6.0000003178914385,
y: 5.9604641222676946e-8,
z: -9.611112594604492
}
Vector3 {
x: 5.888889312744141,
y: 5.9604641222676946e-8,
z: -8.666667938232422
}
Vector3 {
x: -12.333333333333334,
y: 5.9604641222676946e-8,
z: -9.666668256123861
}
Vector3 {
x: -3.722222646077474,
y: 5.9604641222676946e-8,
z: -4.27777894337972
}
Vector3 {
x: -8.111112594604492,
y: 5.9604641222676946e-8,
z: -6.888890266418457
}
Vector3 {
x: -14.166669209798178,
y: 5.9604641222676946e-8,
z: -5.944445610046387
}
Vector3 {
x: -19.444446563720703,
y: 5.9604641222676946e-8,
z: -4.944445292154948
}
Vector3 {
x: -15.277779261271158,
y: 5.9604641222676946e-8,
z: -3.33333428700765
}
Vector3 {
x: -11.555556297302246,
y: 5.9604641222676946e-8,
z: -1.277778645356496
}
Vector3 {
x: -21.22222328186035,
y: 5.9604641222676946e-8,
z: -4.611112276713054
}
Vector3 {
x: -20.72222328186035,
y: 5.9604641222676946e-8,
z: -4.611112276713054
}
Vector3 {
x: -16.722222646077473,
y: 5.9604641222676946e-8,
z: -0.5000009536743164
}
Vector3 {
x: -11.88888963063558,
y: 5.9604641222676946e-8,
z: -0.7777786453564962
}
Vector3 {
x: -20.055556615193684,
y: 5.9604641222676946e-8,
z: -4.666667620340983
}
Vector3 {
x: -2.722222646077474,
y: 5.9604641222676946e-8,
z: -0.27777864535649616
}
Vector3 {
x: -3.055555979410807,
y: 5.9604641222676946e-8,
z: -0.7777786453564962
}
Vector3 {
x: -1.6666666666666667,
y: 5.9604641222676946e-8,
z: -3.77777894337972
}