Spline Mesh Components: Tangent Snapping/Matching?
I've been setting up a system that allows the player to draw splines in real-time, and then connect separate spline meshes together. For example, the player may have to lay out sewage pipes in real time, and then connect separate sewage pipes together.
This has gone very well so far, but I've been struggling with trying to figure out how to snap the tangents of two separate spline mesh actors together seamlessly.
Does anyone know how I can do this?
asked Sep 25 '16 at 07:28 PM in Blueprint Scripting
Figured this out on my own- for anyone who may be wondering, in order to snap the end tangent of one spline mesh component to separate splines mesh's start tangent, you must get the world transform of both spline meshes, and convert the second spline mesh's transform to be relative of the first. Then you get the rotation x vector of the resulting transform, negate the y and z values of the resulting rotation x vector, and plug the final x,y,z values into your new end tangent coordinates. This also works in reverse when trying to snap a start to an end.
answered Oct 01 '16 at 06:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here