why raycast maxdistance would affect rigidbody.addforce?!?!

in the following code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ball : MonoBehaviour {

    [SerializeField] private float m_MovePower = 5; 
    [SerializeField] private bool m_UseTorque = true; 
    [SerializeField] private float m_MaxAngularVelocity = 25; 
    [SerializeField] private float m_JumpPower = 2; // The force added to the ball when it jumps.

    private float k_GroundRayLength = 1f; // Length of the ray to check if the ball is grounded.
    private Rigidbody m_Rigidbody;
    private SphereCollider sc;

    private void Awake()
        m_Rigidbody = GetComponent<Rigidbody>();
        m_Rigidbody.maxAngularVelocity = m_MaxAngularVelocity; // Set the maximum angular velocity.
        sc = GetComponent<SphereCollider>();
        k_GroundRayLength = sc.bounds.extents.y;
        Debug.Log("k_GroundRayLength: " + k_GroundRayLength);

    public void Move(Vector3 moveDirection, bool jump)
        // If using torque to rotate the ball...
        if (m_UseTorque)
            // ... add torque around the axis defined by the move direction.
            m_Rigidbody.AddTorque(new Vector3(moveDirection.z, 0, -moveDirection.x) * m_MovePower);
            // Otherwise add force in the move direction.
            m_Rigidbody.AddForce(moveDirection * m_MovePower);

        // If on the ground and jump is pressed...
        if (Physics.Raycast(transform.position, -Vector3.up, k_GroundRayLength) && jump)
            // ... add force in upwards.
            m_Rigidbody.AddForce(Vector3.up * m_JumpPower, ForceMode.Impulse);

In the standard assest, k_GroundRayLength is set to a constant value of one. I wanted to use this to adjust the ray length according to the ball Size if it ever change:

   k_GroundRayLength = sc.bounds.extents.y;

Would anyone know why “k_GroundRayLength” value actually affects the height of the ball jump???!

This is driving me nuts!! “k_GroundRayLength*2f” will have the ball jump higher!

What am I missing? Any clue?
thx in advance

I am going to assume another script somewhere else is calling move per-frame.

By extending he length of the array, your condition “Physics.Raycast(transform.position, -Vector3.up, k_GroundRayLength)” will be true for more frames the longer k_GroundRayLength is, so it will call AddForce more times, increasing the jump height of your ball.

You can test this by adding a Debug.Log just above line 45 and see how many more times it prints as you change the length of k_GroundRayLength .