Problem:
After importing AngryBots to Unity 5 conversion will break Emeny Spider mechanics. This is solution:
Fix EnemySpider by removing active radius.
In the SpiderReturnMoveController
#pragma strict
// Public member data
public var motor : MovementMotor;
// Private memeber data
private var ai : AI;
private var character : Transform;
private var spawnPos : Vector3;
public var animationBehaviour : MonoBehaviour;
public var moving : boolean;
function Awake () {
character = motor.transform;
ai = transform.parent.GetComponentInChildren.<ai> ();
spawnPos = character.position;
}</ai>
function Update () {
motor.movementDirection = spawnPos - character.position;
motor.movementDirection.y = 0;
if (motor.movementDirection.sqrMagnitude > 1)
{
motor.movementDirection = motor.movementDirection.normalized;
moving=true;
}
if (motor.movementDirection.sqrMagnitude < 0.01) {
character.position = new Vector3 (spawnPos.x, character.position.y, spawnPos.z);
motor.GetComponent.<rigidbody>().velocity = Vector3.zero;
motor.GetComponent.<rigidbody>().angularVelocity = Vector3.zero;
motor.movementDirection = Vector3.zero;
enabled = false;
animationBehaviour.enabled = true;
}</rigidbody></rigidbody>
if (character == motor.transform && motor.movementDirection.sqrMagnitude < 0.01 && moving==true)
{
animationBehaviour.enabled = false;
moving=false;
}
else
{animationBehaviour.enabled = true;
moving=true;
}
}