#How To Detect If Somebody's Hand Is In front Of Their Body.

1 messages · Page 1 of 1 (latest)

tardy turret
#

I know how to do it for above your head but how would I do it for your Hands Being Straight out in front of your body.

#

I tried one but only problem is you have to be facing the X or the Z Coordinate Line

woeful saddle
#

still need help?

tardy turret
#

Ye

tardy turret
tardy turret
#

I tried Player Head Position and Player Right Hand Position with Vector Splits and a Greater Than but it only works when facing a certain way

hushed drum
#

Trigger Volume?

queen folio
#

get the angle of you hand relative to your body

woeful saddle
#

Get a ray cast with camera forward and camera position.

woeful saddle
fossil mauve
#

none of these responses are good

fossil mauve
# tardy turret I know how to do it for above your head but how would I do it for your Hands Bei...

So, I'm assuming you just want if your hands are infront of you (Infront of your body) instead of inside your vision, so:

Get the position of the left hand, subtract it by the position of the player
Multiply the result by the vector (1,0,1)
Use Vector Dot to multiply this result with the forward vector of the player using Get Forward Vector

Now you have a value between -1 and 1, where 1 is "Directly infront of you", 0 is "Directly to your sides", and -1 is "Directly behind you"

If you use Acos on the vector dot result, you will get an Angle instead, so 1 becomes 0 degrees from the front, 0 becomes 90 degrees from the front, and -1 becomes 180 degrees from the front

Do this with your right hand as well, and you will be able to use Less Than and And to check if your Left Hand and Right Hand is infront of you

modern peak