#How to make velocity not in world space

1 messages · Page 1 of 1 (latest)

remote rune
#

When I shake my hand left to right infront of me, my velocity will be changing a lot on one axis. But If I turn ninety degrees, it will change highly on a different axis. Is there a way to get just left to right hand velocity?

modern marten
#

you can also get hand velocity relative to you by rotating by the inverse of your rotation

  • Get Rotation = relative to your head, excluding Y axis rotation
  • Player Get Head Rotation = relative to your head
  • Player Get Camera Rotation = relative to your camera
  • Player Get Gaze Rotation = relative to your head but without being affected by view bobbing etc
remote rune
#

one more thing

#

how would I get a players left direciton

#

like if there was a vector in their ear

#

going out

modern marten
#

Btw, these methods work for anything

Want to get left vector of an object? Rotate (-1,0,0) by inverse of object rotation
Want to get the velocity of ThingA relative to ThingB? rotate ThingA's velocity by the inverse of ThingB

iron apex
#

It is good ?