MassRS Posted March 11, 2015 Posted March 11, 2015 I'm trying to position my camera angle to specific angle (pitch26, angle350) But when i use: if (camera.getPitchAngle() != 26){ camera.movePitch(26); } it just moves the camera 26 degrees but not to 26 degrees.. and if i change it to: while (camera.getPitchAngle() != 26){ camera.movePitch(1); } it just laggs alot
Joseph Posted March 11, 2015 Posted March 11, 2015 I'm trying to position my camera angle to specific angle (pitch26, angle350) But when i use: if (camera.getPitchAngle() != 26){ camera.movePitch(26); } it just moves the camera 26 degrees but not to 26 degrees.. and if i change it to: while (camera.getPitchAngle() != 26){ camera.movePitch(1); } it just laggs alot it lags alot because its stuck in a while loop. try adding a break.
Precise Posted March 11, 2015 Posted March 11, 2015 I'm trying to position my camera angle to specific angle (pitch26, angle350) But when i use: if (camera.getPitchAngle() != 26){ camera.movePitch(26); } it just moves the camera 26 degrees but not to 26 degrees.. and if i change it to: while (camera.getPitchAngle() != 26){ camera.movePitch(1); } it just laggs alot it wont move to 26 exactly as that is botlike. do not use a while loop for this, it will only cause issues: lag in your instance. use boundaries instead like: if (camera.getPitchAngle() < 20 || camera.getPitchAngle() > 30) camera.movePitch(26);
MassRS Posted March 11, 2015 Author Posted March 11, 2015 it wont move to 26 exactly as that is botlike. do not use a while loop for this, it will only cause issues: lag in your instance. use boundaries instead like: if (camera.getPitchAngle() < 20 || camera.getPitchAngle() > 30) camera.movePitch(26); i need it to be 26 +- 1 so 25 or 27 is okay. I'm using this for a range guild script. Is there any way i could align the target(rsobject) with mouse coordinations?