VR - Object follows Hand
i want that selected objects follows my hand relativly. like in this video: https://www.youtube.com/watch?v=IER7vH4yZjs&feature=youtu.be
so what is the math behind it without attaching it to my hand?
asked Jul 13 '18 at 12:09 PM in Blueprint Scripting
I was able to accomplish something very similar to this effect pretty simply by still using the Attach to actor functionality. The first step is extending out the Grab functionality. This can be done by changing the GrabSphere in the BP_MotionController to an elongated box or by using a LineTrace. Box can be set up quick and east, but the LineTrace makes several other more complex aspects easier. Once you can grab things from a distance, you're already getting close to the effect.
The next main step is lock the Box rotation when held. I did this inside the box. When grabbed, I set the actor rotation to a variable "Held Rotation" and enabled a Bool "Held". Then in the event tick, if "Held" is true, I set the actor rotation to "held rotation" You can also add the outline effect here "If held, Set Render Custom Depth True"
That should get you pretty close to the effect you showed in the youtube video. From there you can try to get pretty fancy by using Interps to have the object follow at a slight delay, or by adjusting the movement scale to not be 1 to 1, giving people a greater reaching radius than their own arms length (though that may be too difficult for some)
answered Jul 13 '18 at 07:51 PMEvan.Doody (suspended)
Follow this question
Once you sign in you will be able to subscribe for any updates here