Jump off the edge of the object

Working on runner. Character stands in place and just jumping.

Character jumping:

if (jump) {
dir.y = jumpSpeed;
}
dir.y -= gravity;
rigidbody.AddForce (dir * speed);

Main problem is jump height on the edge of the object. It’s lower than normal jump.

How can I solve this?

still actually