1
This commit is contained in:
parent
2f1114fc1e
commit
46ebaa8dec
@ -406,7 +406,7 @@ behaviac::EBTStatus BaseAgent::CoMoveToCurrentTarget(float distance)
|
|||||||
if (GetOwner()->GetMovement()->GetPathSize() <= 0) {
|
if (GetOwner()->GetMovement()->GetPathSize() <= 0) {
|
||||||
if (context->target.Get()) {
|
if (context->target.Get()) {
|
||||||
if (GlmHelper::IsEqual2D(GetOwner()->GetPos().ToGlmVec3(),
|
if (GlmHelper::IsEqual2D(GetOwner()->GetPos().ToGlmVec3(),
|
||||||
current_target_.Get()->GetPos().ToGlmVec3())) {
|
context->target.Get()->GetPos().ToGlmVec3())) {
|
||||||
} else {
|
} else {
|
||||||
glm::vec3 dir = GetOwner()->GetPos().CalcDir(context->target.Get()->GetPos());
|
glm::vec3 dir = GetOwner()->GetPos().CalcDir(context->target.Get()->GetPos());
|
||||||
GlmHelper::Normalize(dir);
|
GlmHelper::Normalize(dir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user