#How would I detect when i swing my fist down
1 messages · Page 1 of 1 (latest)
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
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
Iron Mam 🥱
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)
i want it to start from top
im swinging down
ah, i just like trying to geuss mechanics when ppl try be secretive for some reason
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
in
"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)"
did you mean hand position or nah
im a little slow
hand velocity
vector dot is projection, works best with directional similarity. Tho u can turn it into positional, which is what distance is made from/uses
for detecting if the movement of the hand is down
not literal 10, cosine(10)
ohhhh
should leave 5 degrees of wiggle room all around the world down (0, -1, 0)
dont believe 10 is working
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
then its too strict, increase to like 30
do that & keep adjusting it
working so ye, brb in a break or sumn. Have one at like 17 min
its doing it even not below waist
bc its downwards movement
regardless of where you are, or hand rotation, etc
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
me jumping triggers it bro
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
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
it activated as soon as i jumped which has no downward motion
also
i have no clue how to understand anythinjg your saying, i am bottom tier at vectors
have no clue about anything
if moving down, like (0, -1, 0), & ur dotting (0, -1, 0). They're the same, value of 1
did u put do in greater than A, & cosine in greater than B
then idk y it triggers on jump. Unless your on screen and the hand animation initially goes down or something
yh i am, but explain it in dumb terms to make it only below waist
i can always just send screen shot when get home in 3 hours
but idk how u expect to to be for screen if the hand should open at the end
i have a vr
i make circuits on screen unless i need to be on vr
ye, so y aren't u testing it on that instead if this can mostly, intuitively be done in vr rather screen
it should still be able to be done on screen