I want to make a sort of mouse jumping system, like the games: GunPoint or RONIN, or golf games. Where you move the arc to make the avatar jump to there, for my 2D platformer game.
I want the gameplay to be like RONIN, where you can grapple to a nearby wall, after jumping.
Theoretically that could work for a slingshot system, I don’t know exactly what the need to give better help unfortunately.
The grappling, if you have a system I’d choosing the wall then you could teleport to the wall and potentially have an enum for slingshot movement and on the wall to contain different logics. A state machine would be better but that is beyond my knowledge. If the grapple is mouse based or something you could have a raycast and get the intersection point.
Edit
More pseudo code for this stuff
enum states = {slingshot, flying, grappled}
var current_state := states.slingshot
func process():
match current_state:
states.slingshot:
launch()
states.flying:
grapple()
states.grappled:
pass # whatever would happen here
func slingshot():
if leftmousepressed:
#launch code I sent earlier
func grapple():
if leftmousepressed:
position = raycast collision point
Forgive me for this was written on a phone without the ability to do much research on the methods for certain things