Evade obstacles after set rotation

pull/1633/head
elsid 6 years ago
parent eb10add0c4
commit 2c464bd682
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -186,15 +186,15 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
if (mRotateOnTheRunChecks > 0) mRotateOnTheRunChecks--;
}
// turn to next path point by X,Z axes
zTurn(actor, mPathFinder.getZAngleToNext(pos.pos[0], pos.pos[1]));
smoothTurn(actor, mPathFinder.getXAngleToNext(pos.pos[0], pos.pos[1], pos.pos[2]), 0);
mObstacleCheck.update(actor, duration);
// handle obstacles on the way
evadeObstacles(actor);
// turn to next path point by X,Z axes
zTurn(actor, mPathFinder.getZAngleToNext(pos.pos[0], pos.pos[1]));
smoothTurn(actor, mPathFinder.getXAngleToNext(pos.pos[0], pos.pos[1], pos.pos[2]), 0);
return false;
}

Loading…
Cancel
Save