#How would I detect when i swing my fist down

1 messages · Page 1 of 1 (latest)

mellow apex
#

I'm trying to make something that activates when I have my fist above my head and then I swing it down to my side then I open my hand

cyan orbit
#

You can get the velocity of your hand which ever hand it is and use vector get magnitude then use a greater than and thats it

mellow apex
#

yeah no

#

it has to be what i said

#

start above head and go down to side

#

what you said is just moving your hand

#

i know it has something to do with getting y axis of vectors, but im not the greatest at vectors. I have a way that would work, but it would do it anywhere below the certain y axis, but not just down to my side

mellow apex
#

not exactly

#

yes the positon

finite zealot
#

ig u can have a position & check if hand distance is less than radius, then set a bool true. Then start checking the swing down stuff, if swing down stuff is true or a timer completes without swing stuff being true, then set bool false

then for things im certain about:

but dot the normalized velocity with (0, -1, 0) (rotate it by body rotation if want relative to body instead just the down for the entire world)

then check the result is >= cos(cone of tolerance to determine if "down" enough (try 10, which means it can have 5 degrees of wiggle room. Generaly just increase/decrease as u go))

the get the magnitude of velocity, check if greater than a meters per sec. If the hand has to be fast, which if it dose, that can pretty much determine if the hand was "swung" as u say (swing)

the check hand position if its distance is less than the radius to a position to your (using vector3 transform to create the offset)

mellow apex
#

im swinging down

finite zealot
finite zealot
# mellow apex i want it to start from top

ig u can have a position & check if hand distance is less than radius, then set a bool true. Then start checking the swing down stuff, if swing down stuff is true or a timer completes without swing stuff being true, then set bool false

#

anyways i gtg back work now

#

combined with original msg

mellow apex
#

im a little slow

mellow apex
#

is thaat whats detecting if my hand is below my waist?

#

or...

finite zealot
#

vector dot is projection, works best with directional similarity. Tho u can turn it into positional, which is what distance is made from/uses

mellow apex
#

so this is correct so far

finite zealot
finite zealot
mellow apex
#

ohhhh

finite zealot
#

should leave 5 degrees of wiggle room all around the world down (0, -1, 0)

mellow apex
#

dont believe 10 is working

finite zealot
#

but i would run a substitle for true & false so u can fine tune the value to see just how far yhe movement has to be down

finite zealot
finite zealot
#

working so ye, brb in a break or sumn. Have one at like 17 min

mellow apex
#

its doing it even not below waist

finite zealot
#

its a single condition, when combined with others, that gets it more into what ur looking for

#

move your hand in a 45 degree angle

the cos(30) shouldnt trigger unless your perception of 45 degrees is bad

move hand under or equal to a 30 degree line, then it should be true

#

nope, greater or equal

1 = vectors are facing the same
0 = vectors are facing 90 degrees apart
-1 = vectors are facing different

you want downwards alignment
velocity is where your hand us going

this is checking if where your hand is within 30 degrees of alignment with the downwards

mellow apex
#

me jumping triggers it bro

finite zealot
#

it dont matter the rotation

if you put up (0, 1, 0), then it would be 30 degrees in alignment with up. It would be the same. 1 = same, etc

finite zealot
# mellow apex me jumping triggers it bro

its a SINGLE condition

did u see me say that specific condition will solve the entire issue? No, thats why i listed more conditions bc they would be COMBINED to get what your looking for

#

that means its working bc when jumping your falling, so it detects downwards movement

mellow apex
#

it activated as soon as i jumped which has no downward motion

mellow apex
#

i have no clue how to understand anythinjg your saying, i am bottom tier at vectors

#

have no clue about anything

finite zealot
mellow apex
finite zealot
# mellow apex

then idk y it triggers on jump. Unless your on screen and the hand animation initially goes down or something

mellow apex
#

yh i am, but explain it in dumb terms to make it only below waist

finite zealot
mellow apex
#

i make circuits on screen unless i need to be on vr

finite zealot
# mellow apex i have a vr

ye, so y aren't u testing it on that instead if this can mostly, intuitively be done in vr rather screen

mellow apex
#

it should still be able to be done on screen

finite zealot
#

on screen, most intuitive i would think is detecting if your hands are infront, then then you look up, then fast down

#

so i would use "If Local Is VR" or whatever it is to make intuitive edits for screen & vr