1
This commit is contained in:
parent
28b8b144ef
commit
a7629bd696
@ -3495,5 +3495,17 @@ void Room::LockRoom()
|
|||||||
|
|
||||||
bool Room::BulletCanReach(const glm::vec3& start, const glm::vec3& end)
|
bool Room::BulletCanReach(const glm::vec3& start, const glm::vec3& end)
|
||||||
{
|
{
|
||||||
|
glm::vec3 a_start = start;
|
||||||
|
glm::vec3 a_end = end;
|
||||||
|
glm::vec3 hit_point;
|
||||||
|
bool hit_result = false;
|
||||||
|
|
||||||
|
map_instance->Scale(a_start);
|
||||||
|
map_instance->Scale(a_end);
|
||||||
|
if (map_instance->Raycast(a_start, a_end, hit_point, hit_result)) {
|
||||||
|
if (!hit_result) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user