Firing rays from a specific angle

SO I want some rays going out from the sides of the player: Not exactly to the front or the back, but at an angle from the sides. Here’s a visual representation:

where the red are the rays

How am I able to achieve this?

2 Likes

slight bump? really need help

roblox chars suck

If I understood your question, you could use something similar to get a direction vector relative to the player’s facing direction:

local rayDir = (char.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(45), 0)).LookVector.Unit * LENGTH

Modify the axis and degrees as needed, then use it in your raycast. :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.