#Need help regarding raycasting
1 messages · Page 1 of 1 (latest)
Just the angle right?
use the dot product formula = arccos((dot product of a and b)/(magnitude of a * magnitude of b))
or just arccos(dot product of unit vector a and unit vector b)
Im gonna be so honest Im not sure if roblox gives any utilities to do this for you this is more of a math standpoint
Also youd have to multiply the initial raycast vector by -1 if its going toward the wall and not from the wall
your vector b should be the hit normal from raycast and vector a the raycast direction vector or vice versa
its perfectly fine lol
alright ill try this