Hello,
I'm creating a game where the player can cast spells towards objects that are in front of him. To know which object it will hit, I cast a ray and get the collider. This works.
However, often an object is just a little to the side, and not picked up. The ray is simply too thin. It's frustrating, because you're sure the player is aiming in the right direction, but it's just too hard to reach the object you want.
So, what I need, is to cast a (probably square) shape to cover everything the player should be able to see/hit. The whole area in front of the player.
Is this possible in Godot? Or do I have to, say, use 9 parallel raycasts to cover a square area in front of the player? Or do I have to resort to using an Area with a cube shape?
I know, for example, that Unity has a RayCastSphere function, where you can cast rays to get everything in front of the player between certain angles. Something like that would be great.
Thanks in advance!