Announcement

Collapse
No announcement yet.

How to I get Motion Controllers Velocity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to I get Motion Controllers Velocity

    I want to add an impact for a punch. Does anyone know how to figure out which direction and how fast the hand is moving?

    Thanks
    About Me

    #2
    Get the world position of the motion controller and put it into a variable called "oldPosition" each tick. At the start of each tick, get the controller position, and subtract oldPosition, that resulting vector is your direction, and the length is the velocity for this tick. Then store the current position to oldPosition so it'll get used in the next tick again.

    Comment

    Working...
    X