diff --git a/08/CS460_Assignment_08__Copy_.pdf b/08/CS460_Assignment_08__Copy_.pdf new file mode 100644 index 00000000..fd1149b7 Binary files /dev/null and b/08/CS460_Assignment_08__Copy_.pdf differ diff --git a/08/robot.js b/08/robot.js index 856f139a..11c29d53 100644 --- a/08/robot.js +++ b/08/robot.js @@ -181,7 +181,18 @@ Robot.prototype.walk = function() { }; Robot.prototype.onStep = function() { + if (this.root.position > 500 || this.root.position.z < -500) { + this.root.rotateY(Math.PI/2); + } + + else if (this.root.position.x > 500 || this.root.position.x < -500) { + this.root.rotateY(Math.PI/2); + } + + this.root.translateZ(10); + + }; Robot.prototype.onAnimate = function() {