#check if player is looking at someone
1 messages · Page 1 of 1 (latest)
You could maybe raycast from player head position in player gaze direction
And check if there’s a player hit when the player claps
Or spherecast to check in a more general area instead of precisely looking at
vector doot
What does lhs and rhs stand for tho?
left hand side, right hand side and https://discord.com/channels/193073071802941451/1078774849188671538
Oh crap my fault
Left Hand Side
Right Hand Side
idek y they're labeled bc they produce the same result no matter what.
all it dose is multiplies all the components & then adds them up
Lhs 1,2,3
Rhs 4,5,6
1,2,3 * 4,5,6 = 4,10,18
4 + 10 + 18 = scalar (32)
What would I even do with the vector dot tho It doesn’t seem like I can use it
and of course, its the same if Lhs & Rhs were swapped
you subtract the player in question's head by your head to get your direction to player, then dot that by your gaze direction, if the scalar is greater than the input FOV range (the cos of your input degrees) cos bc vectors are just cool like that, as the scalar is cosine based (if vectors have magnitude of 1)
you subtract the player in questions head bc its obvi gonna be farther away from yours
🤯
Vector Doot
I will watch
yee, i probably coulda touch on projection 😭
but its not important for ur case, but now ima probably have to make a new vid sometime covering it too, make a whole reference post bout it n such. Im just so tired 🥲
bit late to this but could you specify what you mean by "the sin of your input degrees"?
trying to get this working but roughly doing what youve said makes it very distance dependent
cos btw, forgor
but ye, it should be the threshold "fov"
greater than should be if direction is within that range, less than would be out of that range
if it feels distance reliant, make sure the input directions are normalized
(forward vector n such are notmalized btw, so not those)
normalising the vectors hasn't really done anything
arguably made it more distance dependent
so if greater than cos fov?
sure
dunno, send what u have if still having issues then
notifications quiet 😛
subtract should be normalized
also i would use gaze origin instead camera position
whats the difference between gaze and camera?
camera moves via when in 3rd person i beleive, unless u wanna support that
is there a way to disable it?
also when subtracting, its always whats gonna be bigger subtracted by whats gonna be smaller to get the direction of whats smaller to whats bigger
right
no, thats y gaze origin
wait nah wires, 3 hours sleep, subtract is fine, normalization is the only issue then
is there anything else to normalise because its still very dependent on distance
its acting like a sphere cast with it only activating at furhter distances
dunno, shouldnt be the case
cv2 been really buggy lately
nah, just subtract
rec room moment
well shit
I cant even use sphere cast as I intend on the player being able to get close to the object
is there any errors as well? Other circuits could be erroring at times, causing whatever to not update consistently
uuhhhhhh
yee
cant tell if thats a rooms v2 issue or not
because I have no clue how to stop that
well u said ur using some kinda spherecast?
oh, so its purely this?
it cant be bc it dont have "Get first tag" so its something else
found the issue
I still had a 30hz hooked up to the sphere cast's if statement
so I assume it was fucking with calculations or slowing them down or smt
I think it works now
thanks for the help
yee np
dont know if its a screen issue but it is much more sentitve when it comes to the y axis
itll activate when not on screen
works fine on x/z
ye, dunno
il try it on vr later
Don’t break your controllers!
Get off minecraft wtf