Advice needed about splines/splinemeshcomponent (runtime)

JbkStudios
Mon, 13 Feb 2023 14:06:20 +0000
Blueprint

Hi, I am trying do draw a square spline with a meshcomponent in runtime, but I am running into some issues.
When I click on a location in the level I add a (square and closed) spline to the level.
Then you have 2 options: you drag the mouse cursor to adjust the size of the square and press mouse button to set the size, or you can enter numbers via keyboard and set the spline size that way.

First let me show you the way it should look: (photoshopped)

The result I am getting when setting the size via mouse:

The mesh is stretched over the spline, but the start and end locations move as well as I move the mouse.

And the result I am getting when setting the size via keys:

Here in the first corner the meshes look to be at the correct starting and end points, but the next corner, it is the same as when I use the mouse to size the spline.

Both have the same (basic) method of adding the mesh to the spline, and setting the location. (only mouse one is looped for adjusting the spline to the mouse position)
For now I use 4 meshes (for each side 1), and setting starting and endlocations.

Next another isue I have is that different meshes give different results. for example when using a cylinder instead of a plane the positions of the mesh look like they are correct on the spline points:

Does anyone have any advice on how to get the result I am looking for?

Also I cant get the mouseover spline or clicked on spline to work.
visibillity channel of the used mesh is set to block, mesh has collision, and player controller has click and mouse events enabled. am I missing a step here?

If you need more information please just let me know.

thanks for reading!

1 post - 1 participant