예제 #1
0
    public override void CollectObservations()
    {
        AddVectorObs(tankShooting.CanFire());

        //AddVectorObs(battleArenaManager.GetDataForShoot(turret, target));
        AddVectorObs(battleArenaManager.GetDataForShootV2(turret, target));

        string[] detectable = { search + "Tank", "Environment" };
        AddVectorObs(turretRayPerception.Perceive(range, new float[] { 90f }, detectable));
    }
예제 #2
0
    public override void CollectObservations()
    {
        AddVectorObs(tankShooting.CanFire());

        float rayDistance = 20f;

        float[]  rayAngles         = { 90f };
        string[] detectableObjects = { "wall", "Agent" };
        AddVectorObs(movementRayPerception.Perceive(rayDistance, rayAngles, detectableObjects, 0f, 0f));

        AddVectorObs(turretRayPerception.Perceive(rayDistance, rayAngles, detectableObjects, 0f, 0f));

        AddNostrilStereo();

        Vector3 localVelocity = transform.InverseTransformDirection(agentRigidbody.velocity);

        AddVectorObs(localVelocity.x);
        AddVectorObs(localVelocity.z);
    }