Download

HTC Vive. Teleporting while grabbing an item.

Hi,

I have a scene with some objects I would like to pick and teleport with. I’ve tried this:

  • Attach the object to the hand so it teleports with you. This option has a problem, if I try to throw the object it doesn’t work because there is no physics involved.
  • Grab the object with a physic handle (that will be placed in the hand). Then I can throw it normally but if I try to teleport, the object does not teleport with the hand, it just follows it.

Is there any way to be able to teleport while grabbing the object and throw it too?

Thanks.

The VR template in Unreal Engine 4.13 does exactly what you need.

In Blueprint, the object is designed so that when the object is picked up, an Event is triggered that disables physics, and then attaches the object to the parent. When the object is dropped, an Event is triggered that enables physics, and then detaches the object from the parent.

When I run the VR template, I am able to pick up an object, teleport with the object in hand, and then throw the object across the room after the teleport. If you want to try it out for yourself in 4.13, create a project using the Virtual Reality template. Once you’ve created the project, you’ll have to manually go to Content/VirtualRealityBP/Maps and launch MotionControllerMap from within the editor. To see how Epic created the implementation, go to Content/VirtualRealityBP/Blueprints, and open BP_PickupCube. There you’ll see the Events for Pickup and Drop, as well as what they do.

Sorry, I forgot to add one detail, I’m currently on 4.11.2 version. I’ve tested the VR template in 4.13 (I didn’t know about it, thanks for that) and it really works, looks so good but implementing that on 4.11.2 still doesn’t work. When you enable the physics just before drop the item it falls to the floor instead of being thrown (unless I’m missing something important here).

PS. ok, I was using Vive Controller component for the hands instead of Motion Controller component, I don’t know if there is any difference but now it works, thanks again!