Download

Laser Pointer

I’d like to make a laser pointer using raytracing in UE4 for the Vive controllers. On top of that, I’d like to set it up so that the user teleports to where the pointer is hitting. Here’s what I have for that: 1d1f06f4555ff277919ba588b929db0243bb1fdf.png

Unfortunately, the user only teleports a couple units above their initial location. Maybe the line trace is impacting the model of the controller? I’m not sure where to go after this or how to render a red beam. I could always use the debug line, but that isn’t good enough.

If you think the line trace is impacting the controller model, have you tried putting a breakpoint on the Teleport node to see what the Out Hit actually is? Check and see what Actor it’s hitting and make sure its hitting your ground plane or whatever you expect. You should also be able to drop the controller model (and player!) into the Actors to Ignore array to make sure that they aren’t getting hit

Your line trace is going to 0,0,0 by the way, not out away from the user.

VR laser teleport

I try to do this but the laser gun is not visible.

I try to use GetHandPosition and orientation function but no work

SBiegun_PDG Your trace function is setup wrong and would always trace to the origin,
If you want an explainer of traces I did a video of it here (You can just watch the first bit)
If you wan’t to know a way to do teleportation I have a video here

As for Said Moya
Traces aren’t lasers they are not meant to be visible, to make them visible you’ll either have to turn on debug draw (which isn’t really meant for actual games) or draw your own line by either using a beam particle or scaling up a mesh to the size of the trace