how to make VR weapons or hands not pass through objects. When in use?

Just recently I have seen vr clips of games that stop the hands passing through walls and world objects or other players .
And I have also seen the held weapons not passing through walls and peoples bodies , like wacking a gun on another players head or a table.

what would be the best way to do this?

Rather than using actor/component attach nodes, you would use a set location/rotation and turn on the sweep option. Or you would use vinterp and rinterp so the grabbed object can’t teleport its physics through anything. It’s been about a year since I’ve focused on anything high-intensity though (like combat, swinging swords, w/e).

There’s definitely a ton of fun math that you’ll be delving into to keep proper offsets and movement feel. The best challenge is getting two-handed weapons to not spin on a gimbal lock over the top and bottom of the Y axis. Learned everything I know about vector math from smooshing my head into that (well, I got a good head start on my future projects because of that anyways).

You should investigate using this superb open source and free plugin to do what you want and more.

While I do have complex physics grips in that plugin, you can do mostly the same thing with a PhysicsHandleComponent, just minus some special features. So if you already have a project that is ongoing then using a physics handle component is likely your best bet.

**Thanks for dropping in **mordentral

I just tried out your demo, and the way you handled object collision with held items is exactly what I want.
Unfortunately I ran in to compiler problems when trying to set it up.
Is there a simple blueprint version I could download?

As for the physics handle component , I think I have already used this on a lantern I made , to make it swing , and that seemed to collide with the gun in my other hand. so I think I know what You mean

Physics handle component is what you are looking for. Easy to use, gets the job done :slight_smile: