1
This commit is contained in:
parent
ac12bd057d
commit
b3046a9c2c
@ -753,9 +753,8 @@ int MapInstance::FindStraightPath(int layer,
|
||||
|
||||
int MapInstance::FindRandomPointAroundCircle(int layer,
|
||||
const a8::Vec3& center_pos,
|
||||
std::vector<a8::Vec3>& points,
|
||||
unsigned int max_points,
|
||||
float max_radius)
|
||||
float max_radius,
|
||||
glm::vec3& random_pt)
|
||||
{
|
||||
dtQueryFilter filter;
|
||||
filter.setIncludeFlags(0xffff);
|
||||
@ -788,8 +787,13 @@ int MapInstance::FindRandomPointAroundCircle(int layer,
|
||||
randomPt);
|
||||
|
||||
if (dtStatusSucceed(status)) {
|
||||
random_pt.x = randomPt[0];
|
||||
random_pt.y = randomPt[1];
|
||||
random_pt.z = randomPt[2];
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MapInstance::Raycast(int layer, const glm::vec3& start, const glm::vec3& end, glm::vec3& hit_point)
|
||||
|
@ -46,9 +46,8 @@ class MapInstance
|
||||
std::vector<a8::Vec3>& paths);
|
||||
int FindRandomPointAroundCircle(int layer,
|
||||
const a8::Vec3& center_pos,
|
||||
std::vector<a8::Vec3>& points,
|
||||
unsigned int max_points,
|
||||
float max_radius);
|
||||
float max_radius,
|
||||
glm::vec3& random_pt);
|
||||
int Raycast(int layer, const glm::vec3& start, const glm::vec3& end, glm::vec3& hit_point);
|
||||
bool FindNearestPoint(const a8::Vec3& center, float radius, a8::Vec3& nearestPt);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user