让小球跳起来

// 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);
}

原文地址:https://www.cnblogs.com/jiahuafu/p/7079115.html