I need to know this so I can find how to raycast in a cone shape; is there a way I can do this?
Example:
I need to know this so I can find how to raycast in a cone shape; is there a way I can do this?
Example:
May I ask what are you trying to do with a cone-shaped raycast? Perhaps you can just use a cone shaped part for a hitbox and use :GetPartsInPart
instead?
I’m trying to make a melee system that uses raycasts for hit detection. By cone-shaped, I mean this:
Refer to my original suggestion of using spatial queries
To achieve what you want, check out this other thread:
If it’s just about the vector, you can get the direction in a 2D plane by using the sine and cosine functions. You give it an angle, and cosine and sine give you the X and Y coordinates respectively. Since the 2D vector formed by these two numbers is of length 1, you can use it as a direction.