Ejemplo n.º 1
0
 void UpdateMeshFilterBounds() {
   var actor_bounds = GraspingUtilities.GetMaxBounds(this.gameObject);
   //_environment_size = agent_bounds.size.magnitude;
   //_approach_distance = agent_bounds.size.magnitude + _precision;
   this._actor_size =
       actor_bounds.extents.magnitude
       * 2; //Mathf.Max(agent_bounds.extents.x, Mathf.Max(agent_bounds.extents.y, agent_bounds.extents.z)) * 2;
   this._approach_distance = this._actor_size + this._precision;
 }
Ejemplo n.º 2
0
 void Update()
 {
     if (this._visualize_grid)
     {
         GraspingUtilities.DrawRect(x_size: this._x_size,
                                    y_size: this._y_size,
                                    z_size: this._z_size,
                                    pos: this.transform.position,
                                    color: Color.red);
     }
 }
Ejemplo n.º 3
0
    void Update() {
      this._step_size = this._speed * Time.deltaTime;
      if (this._draw_search_boundary) {
        GraspingUtilities.DrawBoxFromCenter(this.transform.position, this._search_boundary, Color.magenta);
      }

      this._state.ObstructionMotionState = this._state.GetMotionState(
          FindObjectsOfType<Obstruction>(),
          this._state.ObstructionMotionState,
          this._sensitivity);
      this._state.TargetMotionState = this._state.GetMotionState(
          FindObjectsOfType<GraspableObject>(),
          this._state.TargetMotionState,
          this._sensitivity);

      this.PerformReactionToCurrentState(this._state);
    }