mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 20:35:35 +00:00
added spawning
Tile test tool now spawns classes and data Test avoidance added to aicontroller and ainavigation
This commit is contained in:
parent
a5e969a8fd
commit
f730d0bf1c
8 changed files with 286 additions and 301 deletions
|
|
@ -168,8 +168,19 @@ bool AIController::getAIMove(Move* movePtr)
|
|||
{
|
||||
obj = getAIInfo()->mObj;
|
||||
}
|
||||
bool adjusted = false;
|
||||
if (getNav()->avoidObstacles())
|
||||
{
|
||||
adjusted = true;
|
||||
}
|
||||
else if (mRandI(0, 100) < mControllerData->mFlocking.mChance && getNav()->flock())
|
||||
{
|
||||
adjusted = true;
|
||||
}
|
||||
|
||||
// Only repath if not already adjusted and on risky ground
|
||||
RayInfo info;
|
||||
if (obj->getContainer()->castRay(obj->getPosition(), obj->getPosition() - Point3F(0, 0, mControllerData->mHeightTolerance), StaticShapeObjectType, &info))
|
||||
if (!adjusted && obj->getContainer()->castRay(obj->getPosition(), obj->getPosition() - Point3F(0, 0, mControllerData->mHeightTolerance), StaticShapeObjectType, &info))
|
||||
{
|
||||
getNav()->repath();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue