Esempio n. 1
0
    private void FixedUpdate()
    {
        //1.  send position of target/goal to Plugin
        Vector3 targetPos = m_target.transform.position;

        BehaviorPlugin.SetTarget(new float[] { targetPos[0], targetPos[1], targetPos[2] });

        //2. transfer all agent data necessary for force and torque calculations from Unity to Plugin
        //3. update agent position and orientation
        //4. transfer all data necessary for Unity agent update from Plugin
        WriteActorDataArray();
        BehaviorPlugin.UpdateActorData(Time.fixedDeltaTime, m_actorDataArray, m_actorNum);
        WriteActorTransform();
    }