*Chips Required*
And
Player Get Head Position
Get Position
Get Forward Vector
Greater Than
Is Valid
Rec Room Object Get First With Tag
Raycast
Subtract
Vector Dot
Vector Normalize
*Circuit Graph*
Player Get Head Position --> Subtract (top port)
Rec Room Object Get First With Tag --> Get Position --> Subtract (bottom port)
Rec Room Object Get First With Tag --> Get Position -> Raycast (Start Position)
Raycast (Max Distance = [ Range ] )
Subtract --> Raycast (Direction)
Raycast (Player) --> Is Valid
Is Valid --> And (any port)
Rec Room Object Get First With Tag --> Get Forward Vector
Get Forward Vector --> Vector Dot (top port)
Subtract --> Vector Normalize --> Vector Dot (bottom port)
Vector Dot --> Greater Than (0.5 | or Acos of LOS Angle)
Greater Than --> And (any port)
*Results*
if Greater than && Is Valid are True *(when the And chip is True)*; Player Is In LineOfSight
Else; Player Is Not In LineOfSight
#does anyone know how to make a line of sight system by using raycasts?
1 messages · Page 1 of 1 (latest)
thanks
tryna help me with my post 🥺
Wdym?
I know I’m months late but is this for player line of sight or AI line of sight I’m trying to figure out AI line of sight
NVM I’m dumb