Transform mouse line trace to VR controller line trace

Hello everyone. I’m making a simple citybuilding game in VR.

I first made the game for non-VR and later decided to transform it to a VR game.

I’m currently using a line trace from "Convert Mouse Location To World Space’ to make the buildings snap to the closest grid cell, but now I need to make it so it uses the line trace that gets casted from my controller to decide which grid cell to snap to.

I’ve also made a line trace that starts from the controller. They’re in 2 different blueprints so I’m having trouble with how to “combine” them together

My question would be is how do I use that MotionControllerRightAim reference in a different blueprint OR how do I use the placeable actor variable in a different blueprint?

VRPawn linetrace:

Mouse linetrace:

Placeable actor that’s in the blueprint where the mouse linetrace is:
image
image

You could do it in the following way:

My Products

2 Likes

Thank you so much, this worked