VR Motion controller detection and force

Basically i want to hit (punch) my actor with the VR hands and make it fly in the direction that it was being hit with a lot of force. My problem right now is getting the actor to detect witch hand is hitting it and then applying that force and the direction of the force to the actor. I’ve tried using a projectile after it hits the actor but i cant get the correct direction. For example if i hit it down it should fly down, or up it should fly up etc. I need the actor to go far with a standard amount of force that is in a punch in the direction of the punch. Is there a way to do this?

ok sounds good i’ll give it a shot but would step 3 work? because i’ve tried to get the motion controller’s velocity before and it comes back as 0 no matter how i move it. I can only test the VR stuff when im at college because i dont own VR myself so i’ll comment tomorrow and let you know if it worked! thanks again :slight_smile:

  1. For detecting hands,
    You must have collision objects on your VR Hands. When they hit the other actor, you can use onHit events to
    determine the collision object and hence, the hand.

  2. Don’t use projectile. Use “Add Impulse” related nodes or “Add Force” related nodes. Check the documentations of
    both to get more information. I think force might be better choice for you. Do check out other physics interactions
    Physics | Unreal Engine Documentation

  3. For the direction of the force, you should do this.

I have used the “Get Player Linear Velocity” node. It gets the velocity in world space so it will work for you. Do tell me if the above steps work for you.

It worked, thanks! If i have any more questions i’ll let you know :slight_smile: this is for a group project and i’m the only coder and i’m pretty good but not that good lol anyway thanks again :smiley: