Implementing Reload with Motion Controller
I need help. Again!!!
I am working on a shooter in VR and I need to implement Reload functionality with motion controllers something like swing your gun to reload (gunstringer kinect style). I am doing it by getting linear velocity of mesh attached to motion controller and checking change in velocity with previous velocity but its not working fine.
Can anyone help me out please.
asked Jan 09 '17 at 11:54 AM in VR
Are you doing this in blueprint or C++? If you're using the node "Get Velocity", it returns the relative velocity of the components' parent. Which in this case would be 0 since the motioncontroller and the mesh is both moving at the same velocity. Try this out:
AverageVelocity = DeltaLocation/DeltaTime
Record previous location at the end of tick, on new tick you subtract current location from it and divide it by delta seconds = velocity
There is also a good plugin called "Gesture Tracker VR", but what I mentioned above is probably easier to implement. Good luck!
answered Jan 11 '17 at 06:13 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here