0 Replies Latest reply on Jul 28, 2009 3:16 AM by Cube?

    Wall and Camera?

    Cube?

      Im trying to make wall.. but my guy go always trought it?

      This is so far what im done

       

      guy.onEnterFrame=function(){
      radius=8;
      if(Key.isDown(Key.UP)){
      this._y-=10;
      this._rotation =180;
      }
      if(Key.isDown(Key.DOWN)){
      this._y +=10;
      this._rotation = 0;
      }
      if(Key.isDown(Key.LEFT)){
      this._x-=10;
      this._rotation = 90;
      }
      if(Key.isDown(Key.RIGHT)){
      this._x+=10;
      this._rotation = -90;
      }
      while (wall.hitTest(this._x, this._y+radius, true)){
      this._y-
      while (wall.hitTest(this._x, this._y-radius, true)){
      this._y++;
      }
      while (wall.hitTest(this._y, this._x-radius, true)){
      this._x++;
      }
      while (wall.hitTest(this._y, this._x+radius, true)){
      this._x--;
      }
      }

       

      I dont get error but it still go trought it?

      im whatched many tutorials but they dont work...

       

      Then the camera  i dont have no idea how i get camera *(screen) follow the guy when it  moves?