February 27, 201510 yr Has anyone else had problems with this method not doing anything? Havent tried it, maybe show us the code you are using? I might check it out in a minute.
February 27, 201510 yr Author Havent tried it, maybe show us the code you are using? I might check it out in a minute. private void checkCamera() { if (s.myPlayer().getRotation() == northRotation) { if (s.getCamera().getYawAngle() < 360 - 45 && s.getCamera().getYawAngle() > 45) { s.log("turn north"); int number = s.random(360 - 45, 360 + 45); if (number > 360) number -= 360; s.getCamera().moveYaw(number); } } if (s.myPlayer().getRotation() == eastRotation) { if (s.getCamera().getYawAngle() < 45 && s.getCamera().getYawAngle() > 90 + 45) { s.getCamera().moveYaw(s.random(45, 90 + 45)); s.log("turn east"); } } if (s.myPlayer().getRotation() == southRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(90 + 45, 180 + 45)); s.log("turn south"); } } if (s.myPlayer().getRotation() == westRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(180 + 45, 360 - 45)); s.log("turn west"); } } s.getCamera().toTop(); }
February 27, 201510 yr private void checkCamera() { if (s.myPlayer().getRotation() == northRotation) { if (s.getCamera().getYawAngle() < 360 - 45 && s.getCamera().getYawAngle() > 45) { s.log("turn north"); int number = s.random(360 - 45, 360 + 45); if (number > 360) number -= 360; s.getCamera().moveYaw(number); } } if (s.myPlayer().getRotation() == eastRotation) { if (s.getCamera().getYawAngle() < 45 && s.getCamera().getYawAngle() > 90 + 45) { s.getCamera().moveYaw(s.random(45, 90 + 45)); s.log("turn east"); } } if (s.myPlayer().getRotation() == southRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(90 + 45, 180 + 45)); s.log("turn south"); } } if (s.myPlayer().getRotation() == westRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(180 + 45, 360 - 45)); s.log("turn west"); } } s.getCamera().toTop(); } Just tested strictly the moveYaw method, it works, its slow and jerky and doesnt go to the exact angle, but it works (kinda).
February 27, 201510 yr Author Just tested strictly the moveYaw method, it works, its slow and jerky and doesnt go to the exact angle, but it works (kinda). Lol k. Not sure what im doing wrong then Its not that important though. Thanks for ur help!
February 27, 201510 yr Lol k. Not sure what im doing wrong then Its not that important though. Thanks for ur help! Well there are 360 possible degrees in the circle (obviously) and by the looks of it, your code will only execute on 4 of those degrees. 0, 90, 180, 270, or whatever you defined those 4 constants to be.
February 27, 201510 yr Author Well there are 360 possible degrees in the circle (obviously) and by the looks of it, your code will only execute on 4 of those degrees. 0, 90, 180, 270, or whatever you defined those 4 constants to be. That has to do with what direction the player is facing. (north, south, east, and west)
February 27, 201510 yr That has to do with what direction the player is facing. (north, south, east, and west) Oh ok I just reread that. Do your logs execute?
February 27, 201510 yr Author Oh ok I just reread that. Do your logs execute? Yeah. Ill run it again and show u a screenshot Oh ok I just reread that. Do your logs execute? Only the north one and i think its because it logs before it executes the method.
Create an account or sign in to comment