#check if player is looking at someone

1 messages · Page 1 of 1 (latest)

ornate solstice
#

How could a make a system where it could sense if I’m looking at someone if so when I clap my hands they would swap spots with me

eager hull
#

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

ornate solstice
orchid magnet
ornate solstice
#

Oh crap my fault

valid fox
# ornate solstice What does lhs and rhs stand for tho?

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)

ornate solstice
#

What would I even do with the vector dot tho It doesn’t seem like I can use it

valid fox
#

and of course, its the same if Lhs & Rhs were swapped

valid fox
#

you subtract the player in questions head bc its obvi gonna be farther away from yours

ornate solstice
#

Oh okay

#

But would I subtract the position of the head or the orientation?

ornate solstice
#

🤯

ornate solstice
#

I will watch

valid fox
# ornate solstice 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 🥲

zealous quarry
#

trying to get this working but roughly doing what youve said makes it very distance dependent

valid fox
valid fox
#

(forward vector n such are notmalized btw, so not those)

zealous quarry
#

normalising the vectors hasn't really done anything

#

arguably made it more distance dependent

zealous quarry
valid fox
valid fox
valid fox
# zealous quarry

notifications quiet 😛
subtract should be normalized
also i would use gaze origin instead camera position

zealous quarry
#

whats the difference between gaze and camera?

valid fox
zealous quarry
#

is there a way to disable it?

valid fox
zealous quarry
#

right

valid fox
valid fox
zealous quarry
#

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

valid fox
zealous quarry
#

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

valid fox
#

is there any errors as well? Other circuits could be erroring at times, causing whatever to not update consistently

zealous quarry
#

uuhhhhhh

valid fox
#

yee

zealous quarry
#

cant tell if thats a rooms v2 issue or not

#

because I have no clue how to stop that

valid fox
#

well u said ur using some kinda spherecast?

zealous quarry
#

I tried that at first

#

but it would stop working when close

valid fox
#

it cant be bc it dont have "Get first tag" so its something else

zealous quarry
#

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

valid fox
#

yee np

zealous quarry
#

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

valid fox
#

ye, dunno

zealous quarry
#

il try it on vr later

zealous quarry