Spawn a cube at touch controller position?

Hi, I’m trying to setup a VR thing where the user can build up a scene around them by wherever they click with an oculus touch controller, they can generate a cube at the position of the controller in 3d space. just wondering where to start really.

thanks!

Hi.

It sounds like you need to get the controller’s position in world space and use that as the spawn location for the cube. I’d recommend doing this in the vr controller blueprint. You can then enable physics on the spawned object so it can fall.

Hi, I was able to make this work based on the VR blueprints, though I can’t map the action to any other buttons than the trigger, which is being used for the grabbing action. Any ideas how I can use other button inputs?

excellent, it looks like you need to set up a custom input in the project setting. then in the blueprint get the input event and possible enable input within the blueprint if needed.

creating custom inputs in ue4 .
https://docs.unrealengine.com/en-US/Gameplay/HowTo/SetUpInput/Blueprints

enabling input within a blueprint.
https://docs.unrealengine.com/en-us/Gameplay/HowTo/ActorInput/Blueprints

,Have you found a way to make it work?

Mine looks like this and when i press the trigger the controller just starts vibrating.
would be nice to see your way to do it.

IT works! Sorry, i didn’t see one collision box that “interacted” with the spawnd cube