Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Bug Camera somehow mixes up pitch and yaw

Joined
Nov 3, 2013
Messages
609
@Arbiter @Cloud

This is a very strange exception I"m getting:
Code:
java.lang.IllegalArgumentException: Pitch must be a value between 0 and 1
which corresponds to this line:
Code:
Camera.concurrentlyTurnTo((int)(Camera.getYaw() + Random.nextInt(0, 360)) % 360);

So either somehow java is switching that in method call to the double one, or the exception message is incorrect.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,053
@Arbiter @Cloud

This is a very strange exception I"m getting:
Code:
java.lang.IllegalArgumentException: Pitch must be a value between 0 and 1
which corresponds to this line:
Code:
Camera.concurrentlyTurnTo((int)(Camera.getYaw() + Random.nextInt(0, 360)) % 360);

So either somehow java is switching that in method call to the double one, or the exception message is incorrect.
Is the exception occurring locally or on the Bot Store? If it's on the Bot Store, it could be obfuscation related. You could try clarifying the line by setting a temporary variable "final int yaw = Camera.getYaw() + Random(0, 360);" and then using it in the following line "Camera.concurrentlyTurnTo(yaw % 360);" If this does fix it, we will look into fixing the obfuscator.
 
Joined
Nov 3, 2013
Messages
609
Is the exception occurring locally or on the Bot Store? If it's on the Bot Store, it could be obfuscation related. You could try clarifying the line by setting a temporary variable "final int yaw = Camera.getYaw() + Random(0, 360);" and then using it in the following line "Camera.concurrentlyTurnTo(yaw % 360);" If this does fix it, we will look into fixing the obfuscator.
Both I think. But mostly on the store. I don't see a need to clarify. The % operator can only be used on and output ints (in java).
 
Joined
Dec 10, 2014
Messages
3,332
I've had this occur once when testing a bot locally, does turnTo(yaw) determine a pitch if you don't specify one?
It's only ever happened to me once, but I'm pretty sure I define the pitch most of the time, so it might be that the pitch that gets determined/generated doesn't fit the bound?
 
Joined
Nov 2, 2015
Messages
302
I had this problem locally when moving the camera to a random yaw.


Other camera issues:
And runemate moves the camera left almost everytime. Even if the item it is focusing on is just a little to the right the bot will move it all the way around (almost 360)
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
I've had this occur once when testing a bot locally, does turnTo(yaw) determine a pitch if you don't specify one?
It's only ever happened to me once, but I'm pretty sure I define the pitch most of the time, so it might be that the pitch that gets determined/generated doesn't fit the bound?
Nope, it passes the current pitch into the method that accepts both as an argument. That's why I was curious what the current pitches value was, if it was somehow outside of the bounds than the issue would make sense.
 
Top