poprawki materialy unity 6, pajaki, podmiana katalogu FSM w AIControlerze, zmiana w Spider 2.0 Behaviours , skopane zycie bylo, ladowalo pajaka z zyciem 2.
This commit is contained in:
@@ -19,6 +19,11 @@ namespace Invector.vCharacterController.AI.FSMBehaviour
|
||||
}
|
||||
|
||||
public vAIMovementSpeed patrolSpeed = vAIMovementSpeed.Walking;
|
||||
|
||||
public bool patrolInStrafe;
|
||||
[vHideInInspector("patrolInStrafe")]
|
||||
public bool updateRotationInStrafe=true;
|
||||
|
||||
public override void DoAction(vIFSMBehaviourController fsmBehaviour, vFSMComponentExecutionType executionType = vFSMComponentExecutionType.OnStateUpdate)
|
||||
{
|
||||
DoPatrolWaypoints(fsmBehaviour);
|
||||
@@ -88,7 +93,14 @@ namespace Invector.vCharacterController.AI.FSMBehaviour
|
||||
else
|
||||
{
|
||||
|
||||
fsmBehaviour.aiController.MoveTo(fsmBehaviour.aiController.targetWaypoint.position, patrolSpeed);
|
||||
if (patrolInStrafe)
|
||||
{
|
||||
if(updateRotationInStrafe) fsmBehaviour.aiController.StrafeMoveTo(fsmBehaviour.aiController.targetWaypoint.position, fsmBehaviour.aiController.desiredVelocity, patrolSpeed);
|
||||
else fsmBehaviour.aiController.StrafeMoveTo(fsmBehaviour.aiController.targetWaypoint.position, patrolSpeed);
|
||||
}
|
||||
|
||||
else
|
||||
fsmBehaviour.aiController.MoveTo(fsmBehaviour.aiController.targetWaypoint.position, patrolSpeed);
|
||||
if (debugMode) Debug.Log("Go to new Waypoint");
|
||||
}
|
||||
}
|
||||
@@ -97,13 +109,25 @@ namespace Invector.vCharacterController.AI.FSMBehaviour
|
||||
{
|
||||
if (fsmBehaviour.debugMode)
|
||||
fsmBehaviour.SendDebug("MoveTo SelfStartPosition", this);
|
||||
fsmBehaviour.aiController.MoveTo(fsmBehaviour.aiController.selfStartPosition, patrolSpeed);
|
||||
if (patrolInStrafe)
|
||||
{
|
||||
if (updateRotationInStrafe) fsmBehaviour.aiController.StrafeMoveTo(fsmBehaviour.aiController.selfStartPosition, fsmBehaviour.aiController.desiredVelocity, patrolSpeed);
|
||||
else fsmBehaviour.aiController.StrafeMoveTo(fsmBehaviour.aiController.selfStartPosition, patrolSpeed);
|
||||
}
|
||||
else
|
||||
fsmBehaviour.aiController.MoveTo(fsmBehaviour.aiController.selfStartPosition, patrolSpeed);
|
||||
}
|
||||
else if (fsmBehaviour.aiController.customStartPoint)
|
||||
{
|
||||
if (fsmBehaviour.debugMode)
|
||||
fsmBehaviour.SendDebug("MoveTo CustomStartPosition", this);
|
||||
fsmBehaviour.aiController.MoveTo(fsmBehaviour.aiController.customStartPosition, patrolSpeed);
|
||||
if (patrolInStrafe)
|
||||
{
|
||||
if (updateRotationInStrafe) fsmBehaviour.aiController.StrafeMoveTo(fsmBehaviour.aiController.customStartPosition, fsmBehaviour.aiController.desiredVelocity, patrolSpeed);
|
||||
else fsmBehaviour.aiController.StrafeMoveTo(fsmBehaviour.aiController.customStartPosition, patrolSpeed);
|
||||
}
|
||||
else
|
||||
fsmBehaviour.aiController.MoveTo(fsmBehaviour.aiController.customStartPosition, patrolSpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user