#how do i detect if a player is looking at an object
25 messages · Page 1 of 1 (latest)
It casts a ray
and checks what it hits
and how far that hits
all you need is a starting position (Player position) and direction (Local Camera Forward or Player Forward Vector)
spherecast
same thing as raycast except it sends a lot of rays in a radius
Help me backrooms pls
no
Why
you come in someone else's help post to beg for help with your backrooms game
that's why
get out of here
Need help make walls floor roof monsters weapons water system fortnite like battle pass military game xp system star wars resident evil game back rooms xp system entity doors roblox game who join me for helpig mi
Plz
leave this post
I’d recommend using a vector dot method if u want to check if it’s in ur field of view. It’s much more efficient than a spherecast
Because they're shit and that's what kids like to make.
If you’re asking about the vector3 dot method, then here’s an image that shows the setup. Keep in mind that I used variables for this setup, but they are not needed depending on how you’re incorporating this. I’m not gonna explain fully what the Vector3 Dot does, but just know that it’s checking how close you are to looking at an object here. The output ranges from -1 to 1 depending on how close u are to looking at the object.