1
This commit is contained in:
parent
f4a4f60553
commit
baf75f0f91
@ -186,6 +186,10 @@ behaviac::EBTStatus AndroidAgent::DoAttack()
|
|||||||
if (!enemy) {
|
if (!enemy) {
|
||||||
return behaviac::BT_FAILURE;
|
return behaviac::BT_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (GlmHelper::IsEqual2D(GetOwner()->GetPos().ToGlmVec3(),
|
||||||
|
enemy->GetPos().ToGlmVec3())) {
|
||||||
|
return behaviac::BT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
glm::vec3 dir = GetOwner()->GetPos().CalcDir(enemy->GetPos());
|
glm::vec3 dir = GetOwner()->GetPos().CalcDir(enemy->GetPos());
|
||||||
GlmHelper::Normalize(dir);
|
GlmHelper::Normalize(dir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user