when im testing my game in fullscreen, the climb speed is correct, however when i test it in the smaller window, my climb speed is increased drastically and shoots me out the top of the ladder, this issue is fixed by not multiplying climbPpeed by time.deltatime, but then it wont be framerate independant
private void Climb()
{
if (!myCollider.IsTouchingLayers(LayerMask.GetMask("Climbing")))
{
//myAnimator.SetBool("Climbing", false);
myRigidBody.gravityScale = gravityScaleAtStart;
return;
}
float controlThrow = Input.GetAxisRaw("Vertical"); //value between -1 to 1
Vector2 climbVelocity = new Vector2(myRigidBody.velocity.x, (controlThrow * climbSpeed)* Time.deltaTime);
myRigidBody.velocity = climbVelocity;
myRigidBody.gravityScale = 0f;
}