Chase Posted February 4, 2018 Posted February 4, 2018 if (camera.getPitchAngle() < 44) { status = "Moving camera angle"; int targetPitch = random(44, 67); log(targetPitch); if (camera.movePitch(targetPitch)) { if (!CTime.sleepUntil(3000, 100, () -> camera.getPitchAngle() == targetPitch)) { return random(50, 300); } } } This always sets my camera pitch to 67... targetPitch doesn't always return 67. Let me know if you get this behavior too, or if I'm doing something wrong in my code.
Stimpack Posted February 4, 2018 Posted February 4, 2018 maybe the minimum pitch for that particular area is 67
Chase Posted February 4, 2018 Author Posted February 4, 2018 1 minute ago, Stimpack said: maybe the minimum pitch for that particular area is 67 67 is the maximum pitch in the game actually. I was testing this by pausing and moving my pitch below 44, so I don't believe this could be the problem. Looking for others to test this. This could be a serious bug in the client, if every script is running at 67 pitch
Stimpack Posted February 4, 2018 Posted February 4, 2018 doubt every script is running at 67 pitch lol [INFO][Bot #1][02/04 09:00:58 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:00:58 AM]: [3240] 47 [INFO][Bot #1][02/04 09:01:18 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:18 AM]: [3240] 56 [INFO][Bot #1][02/04 09:01:18 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:18 AM]: [3240] 50 [INFO][Bot #1][02/04 09:01:19 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:19 AM]: [3240] 53 [INFO][Bot #1][02/04 09:01:20 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:20 AM]: [3240] 47 seems fine, i'm north of sw varr mine
Chase Posted February 4, 2018 Author Posted February 4, 2018 4 minutes ago, Stimpack said: doubt every script is running at 67 pitch lol [INFO][Bot #1][02/04 09:00:58 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:00:58 AM]: [3240] 47 [INFO][Bot #1][02/04 09:01:18 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:18 AM]: [3240] 56 [INFO][Bot #1][02/04 09:01:18 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:18 AM]: [3240] 50 [INFO][Bot #1][02/04 09:01:19 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:19 AM]: [3240] 53 [INFO][Bot #1][02/04 09:01:20 AM]: [3240] Moving camera angle [INFO][Bot #1][02/04 09:01:20 AM]: [3240] 47 seems fine, i'm north of sw varr mine Are you checking to see if the pitch is indeed set to that pitch though?
Stimpack Posted February 4, 2018 Posted February 4, 2018 yeah, for the most part it works, sometimes it's off by +- 2 degrees. probs the sleep time used while checking to see if pitch is desired amount before releasing the up/down key. idk https://i.imgur.com/gQN1fJo.gifv
Chase Posted February 4, 2018 Author Posted February 4, 2018 4 minutes ago, Stimpack said: yeah, for the most part it works, sometimes it's off by +- 2 degrees. probs the sleep time used while checking to see if pitch is desired amount before releasing the up/down key. idk https://i.imgur.com/gQN1fJo.gifv Can you link your updated code?
Stimpack Posted February 4, 2018 Posted February 4, 2018 um, it's your code that u posted if (camera.getPitchAngle() < 44) { log("Moving camera angle"); int targetPitch = random(44, 67); log(targetPitch); if (camera.movePitch(targetPitch)) { Sleep.until(() -> camera.getPitchAngle() == targetPitch, 3_000, 400, 200); } } except i use Sleep class cuz i dont have ur CTime
TrekToop11 Posted February 4, 2018 Posted February 4, 2018 int angleToMove = s.random(44, 67); log("Angle to move to: " + angleToMove); if (getCamera().getPitchAngle() < 44){ log("Current camera pitch is: " + getCamera().getPitchAngle()); getCamera().movePitch(angleToMove); } else { log("Camera pitch is " + getCamera().getPitchAngle() + " which is " + (getCamera().getPitchAngle() - 44) + " greater than 44, don't move camera."); }
Chase Posted February 4, 2018 Author Posted February 4, 2018 48 minutes ago, TrekToop11 said: int angleToMove = s.random(44, 67); log("Angle to move to: " + angleToMove); if (getCamera().getPitchAngle() < 44){ log("Current camera pitch is: " + getCamera().getPitchAngle()); getCamera().movePitch(angleToMove); } else { log("Camera pitch is " + getCamera().getPitchAngle() + " which is " + (getCamera().getPitchAngle() - 44) + " greater than 44, don't move camera."); } Weird behavior on my side only. Thanks guys! 1