Grappling using Character Controller

I am using Character controller to move my player and I wanted to create a grappling gun which can pull the player towards what is hit. I am using a raycast to detect a hit to an object and then pulling the player towards that position. That hit.point is stored in a variable as soon as it hits something. My coded is very janky. I wanted it to feel like Fortnite cough. Much like the grappling gun in the game (the one that pulls the player. not pull objects).
Here is my code (please have mercy on me):


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

public class GrapplingGun : MonoBehaviour
{

public float grappleSpeed = 50f;

public float grappleRaycastDistance = 100f;

public LayerMask grappleLayers;

public Transform camera;

public Transform player;

public Transform target;

public bool grappling = false;

public Vector3 grapplingPoint;

// Start is called before the first frame update
void Start()
{
    
}

// Update is called once per frame
void Update()
{
    if (Input.GetMouseButton(0))
    {
        StopGrapple();
        shootGrapplingGun();
    }

}

void FixedUpdate()
{
    if (grappling)
        StartGrapple(grapplingPoint);
}

void StartGrapple(Vector3 newPos)
{

    Vector3 moveVector = newPos - player.position;
    player.GetComponent<CharacterController>().Move(moveVector * grappleSpeed * Time.deltaTime);

    float distanceBetweenPlayerAndGraplePoint = Vector3.Distance(player.position, grapplingPoint);

    if (distanceBetweenPlayerAndGraplePoint <= 5)
    {
        StopGrapple();
    }

}

void StopGrapple()
{
    grappling = false;
}

void shootGrapplingGun()
{

    RaycastHit hit;

 
    if (Physics.Raycast(camera.position, camera.forward, out hit, grappleRaycastDistance, grappleLayers))
    {
        Debug.DrawLine(camera.position, hit.point, Color.red);

        //hit an object that is grappable
        //now grapple
        grappling = true;
        grapplingPoint = hit.point;

    }

}

}

So my basic problem is that I am not sure how to move the character towards the point (the above code moves the player towards the point but its really bad). I want to have an addforce where the user will have a drag after they are pulled. right now, the character just drops to the ground. and I wanted to have a jump effect too. by jump effect I mean a small height if the object being pulled to is high up in the sky.

with the above method, i am just settings the grappling to false if the distance is less than or equal to 5. that I know is not how it should be. any ideas would help me a lot. main problems are that I can not set the drag/gravity like when using rigidbody. second is that I need to stop grappling. thanks!

@unu111 I didn’t look at your code too much, but the way how I moved it is by getting a Vector 3 of the raycast end (hit.point) and minusing that by transform.position and then I used that as my vector3 for .Move, just search up how to move a player towards a Vector3