CHADALAK1
(CHADALAK1)
July 27, 2016, 8:36pm
25
I made a grip plugin for the SteamVR template in here with custom MotionControllerComponents that supports better gripping mechanics. Someone was modifying it themselves for two handed grips and I don’t see why it would be that hard to achieve.
You are right, the physics constraints are lackluster because of the delay in movement (they also don’t receive render thread positional updates), the physics handle is just a managed physics constraint, it has all of the same issues, and the attachto has issues not just because of what you mentioned, but also because the engine throws out sweeping attached actors so you can’t use “EventHit” and they will pass through geometry.
The plugin originally added a sweep to all attached actors of a controller but now just has them move towards it and collects their components for the controllers late rendering thread positional updates. You could add tremor damping to it if you wanted to by modifying both the late and normal tick update positions but I honestly wouldn’t suggest it. In my opinion tremor is a necessary evil to correct tracking as things are performing as they would out of game (pick up a pen and hold it out without any tremor, I can’t).
Here is my original demo enviroment using it:
0hCXV0-YDyQ
Here is the template I made it for:
https://forums.unrealengine.com/showthread.php?106609-Steam-VR-Template
Here is the plugin itself:
https://bitbucket.org/mordentral/ue4-vr-grippable-motion-controller-plugin
I couldn’t find an immediate solution that was better than this. I do have to update it for 4.12 though, due to overriding a private class within a class acting weird in UE4 I just re-wrote the entire motion controller component so I need to pass over changes in new versions (if there are any) manually at the moment.
It has multiple styles of gripping available based on how you use it (free grip, snap, snap within radius, no collision but still hit events). Covers about all of the bases as far as I am aware, I probably should have broke it out into its own thread at some point.
How did you manage to have the bones on the arms follow with the Vive Controllers?? Is this also in the example template? If not, could you please show us a BP of the steps you did to solve this?