How to gather/mine a recourse for a rts game?

This is the root of your problem … I am assuming you are using a NavMesh and it sounds like the player can’t plot a route to the rock and therefore can’t walk to it or can only walk to it until the NavMesh ends.

You need to not use the NavMesh for this step, rather add a sphere trigger to your rock … on click get the location of the rock in world space … and make the player walk to that world space. The trick here is to use the NavMesh until you can’t anymore and then let the player walk straight until the player collides with the rock and then starts mining.

Another option would be to have the rock not block the NavMesh, but this could cause other issues … you will probably find that is why the community RTS went the route it did.

Obviously if you are not using a NavMesh, then this is a pointless response and I apologise.