Plane Trace between two points on the screen
This is less of a technical problem and more of a math problem. I want to do a trace between two points on the screen, infinitely in distance from the direction from the cameras vector. I've been trying to use a box trace that is very thin. But my problem is trying to affect the box rotation that it is aligned to the camera.
Basically I want to shoot out a rectangle from 2 points on my screen and get everything in between them. If there is an actual way to do this other than a box trace I would appreciate that too.
If I'm not explaining this well enough, I can post images when I get home from work.
asked Jan 14 '19 at 04:09 PM in Blueprint Scripting
You can try something like this:
It creates a virtual box between 2 points and gets all overlapping actors with the required collision preset. Is you want this box to be closer to a plane, just don't use the Box Extent Z, simply give it a value of a few units, and don't use Box Pos Z, set it to the Camera Z Location.
But this box uses world coordinates, so if those two points are quite far one from another, the box extent will be very large, and its other corners may overlap lots of actors, so keep that in mind.
Follow this question
Once you sign in you will be able to subscribe for any updates here