How can you stop VR Hands passing through walls and other objects

Been trying to pull this off for a while without success.
Tried attaching collision spheres, Tried to make a physics animation setup to use the physics asset, = not been able to get that to work.
every time my hand just passes through world Objects like they are not there :frowning:
Anyone got any advice or done something similar?

@AlphaWolF - There are a couple solutions but you really need to take into account player experience. Imagine yourself playing VR, immersion is key here, if you move your hand in the real world but in the game it collides with an object, what should happen? If you stop the hand in the game then your hand in real life keeps moving and thus your game hand and real hand are “out of sync”. This creates a very poor and unrealistic experience.

If you did want to do that you have a few options, the easiest, encompass your hands in a sphere with collision enabled. Make sure the objects you collide with have a blocked collision channel. The “VR Hands” need to have a sphere which encompasses them and has collision fully enabled.

A more elegant solution is to simply use a post process effect to grey out the hand meshes, darken the screen, etc. etc. when the hands are going through a wall or object which you don’t want them to interact with. This is the more common solution and used by many mainstream titles.

Thanks , I have evaluated the user experience already and there is a reason why I am trying to do this as it is part of something else I’m trying to do.
I have tried to use collision spheres but they wont work unless they are also simulating physics .
hense why I tried to create a physics animation blend Hoping that the skeletal physics assets physical bodies will collide with the walls .
I also tried to set simulate physics below on the hands.
and now I have tried to add a permanent physical body to the hands via a physics handle . which I believe should work .but so far has not :frowning:

In the hands mesh instead leave like default “No Collision”, can turn to Custom and Block only WorldStatic. If you want something more personal because don’t want hands stuck in all static objects can create in Project Settings/Collision a new Object Channel, for example call it VRWall and leave Block like default for then set it up in the Presets or place in the commented first step instead WorldStatic


Why can no one ever just answer a question? Why do you have to set up elaborate scenarios he didn’t ask about?

WHAT IF HE WANTS TO KNOCK OVER A DOMINO?

I counter your statement with THIS: If you move your Hands in the real world, and they they hit bottles, chairs or DOMINOES,. .Do your hands pass THROUGH the bottles, chairs or DOMINOES?? NO! THEY MOVE! You injected assumptions instead of simply answering,…

4 Likes

HELLO! Thank you for your answer. Can you tell exactly me where to do that? I have seen that option many times, but other times it is simply nowhere to be found. I have gone into the Physics for my VR Hand and set up Collision Bodies for each finger segment (I want FINE Motor Control in VR not a 'SPHERE wrapped around each hand,.!!!. as suggested above,… )

Gripping. pointing, VR, Grabbing w/ custom animation etc., Teleporting AND Free locomotion, I have all that already set up, I just want to be able to point my VR finger and tap a candle for instance,*** and the candle falls over! :)***

I go into my Hand mesh,. At the upper right I see the entries for Skeleton | Mesh | Animation| Blueprint | and Physics. Like I mentioned above, I have gone into physics and setup Multi Convex Hulls for the Hand and each Finger Segment (three per finger the shape of the mesh), I also set up Joint Limits etc. Appropriate for hands fingers (though I am just realizing, I’m controlling the hands in VR, so I may be wasting my time with ‘constraints’ I just want per finger COLLISION and Interaction w/ world props and objects

I the physics panel for each Convex Hull Body, I have checked: ‘simulation generates hit event’, and ‘Collision Response’ and ‘CCD’ (but are those for when the FINGERS get collided with?) Regardless they still go right through the Candle (Unless I Grab it,…)

I know there is a place in most meshes, to CHECK Physics, and change the Physics Default to ‘Physics Actor’ or even Block all,. , BUT I CAN’t Find it :slight_smile: I go in the MESH part and the only physics option is ‘enable per poly collision’! I will add a couple images

THANK YOU!!!

I FOUND A BETTER WAY THAT IS ONE CLICK!*** ;~) (They love to send people off on ODYSSEYs here :slight_smile:
(Lock down has been good for my UE4 skill! ;)***

  1. In a VR Template ‘Derived’ Project, navigate to:* Game/Content/VirtualRealityBP/Blueprints/BP_MotionController.uasset*

  2. In the Event Graph under the section: *** ‘Only let hand collide with environment while gripping’ ***
    See the Top Node called:** ‘Set Collision Enabled’,** defaults to ***‘No Collision’,

  3. ***Click the drop down and select **‘*Collision Enabled (Query and Physics)’

That should do it, NOW your hands should HIT THE BLOCKS when they are not grabbing them.

BONUS: That just stops the Hands going through stuff when not grabbing; do you also want to be able to grab objects, or hold hand up against a wall, while having each finger beautifully collide with the other entity individually and not interpenetrate and with as few as 2 Hand Animations??! (That is what they are describing above btw)

Well here you go! The most amazing and free version:

GitHub - inugames/basic-vr: Extending the default UE4 VR template with basic interactions like in Oculus/SteamVR Home. WIP. (Click Green Code button then Download Zip, the UE4 Project and filers will download)

Based on the UE4 ‘VR Template’, it has the same option for ‘collision enabled’ as above and like above defaults to ‘No Collisions’ too, so don’t forget to swap that option! It is a lot easier to get into than VR Expansion but has some end-features in common.

It also has the most wonderful individual finger tracing and colliding while grabbing!

It comes with Teleport, Turn in place (Free form is there or was easy to add I forget)

AND it has Tele-Grab!!! (You lit up and object from across the room by pointing to it, at it (or looking at it I forget, been a minute), press trigger or Grip to grab etc then use thumbstick to pull it into your hand! I think it is one of the MIT Free License but is very basic use of UE4 so no plugins, just GOOD! and useful…


3 Likes

WOW!! My post above Wondering ‘HOW’ is from February 23 2019 and my most recent post SHOWING HOW, is today, February 22 2021! I guess Late February is my time to work with UE4 Physics!

COME SEE MY NEW UPCOMING VR / UE4 DevLog and Series. called: ‘WORKING (while) IN VR!’

Subscribe for LIVE Premiere Announcement at: youtube.com/NextWorldVR

Lol Im so WAY PAST this post now.
This is where Im at these days.

Impressive! Any tips or tutorials etc. you can point towards that would help me create something similar?

sorry Not yet as Im still trying to perfect it and work out some kinks, Might sell it when Im done not sure

3 Likes

Hey that’s really amazing. Did you improve it? Would you share it or sell it?
Thanks