I’m making an FPS with a grappling hook mechanic. The grappling hook uses a raycast and checks if its colliding with anything and pulls the player to that point. The problem is that its really hard to aim if you’re going a little fast. How would I check for a point near where I’m aiming and make that the point my player grapples to, even if the ray doesn’t touch it?
Just throwing an idea out, try to give the grapple point an area node with a “forgiving sized” collision shape. You have to configure your raycast to be able to interact with areas in the inspector window.
Var collider = raycast.get_collider()
If collider is Area#(2D/3D) whichever...
#collider.grapple_and_swing()
Performance issues in Godot typically crop up when people are making thousands or tens of thousands of things. If you have 10,000 grapple points in a level, you should either make smaller levels or chunk the level. But if you’re trying to do something like the Spiderman game, you shouldn’t be using grapple points at all.