Spline Mesh Component Scale

Hi all,

using the Vive, when I spawn a BP actor that contains a spline mesh component (which in turn is assigned a static mesh in that BP) and I set it’s start/end/start tangent with the “Set Start and End” node to start at the right-hand-side controller, use that controller’s forward vector as start tangent and some other point as end point, I get a spline mesh shaped accordingly (something like the normal arching VR-teleporter beam). All is good.

Set-up as shown on the picture (this is an example set-up for illustration):

However, when I try to adjust the scale of the spline mesh in the BP (so as to make the resulting arch beam thicker for example), the spline mesh in VR gets scaled, but from an origin that I have not been able to determine. In other words, not only is the mesh scaled, it also moves away from the ‘spline start’ and ‘spline end’ locations. For example when I apply a scale of 1.05 to the spline mesh in the BP, the actual spline in VR is half a meter offset from my controller.

What is the reason for this? Is it wrong to assume that when I set the scale of the spline mesh that it does that simply based on the origin in the BP itself without any influence of the world location of the BP later in the game? Because after applying the scale in the BP, the spline mesh is scaled correctly in the viewport just as I’d want it, but as soon as the BP is spawned, the spline mesh receives that strange translation in addition to the scale.

Would love to understand this…

I know this was a while ago but did you ever solve this?

I managed to solve it by using the SetStartScale and SetEndScale functions on the mesh rather than setting the scale directly.

3 Likes

No. For this particular situation I ended up creating several mesh cylinders with different diameters to switch between whenever I need to work with a different “scale”

Ah. I’ll keep that in mind. Thanks.

This strange behavior is still active in 4.24.3.
Can confirm the workaround of @john1089 resolves this undesired side effect.
Thanks!

It seems the origin from this weird scale is from 0,0,0. In the Add Spline Mesh Component there is a Start Scale and End Scale property that can also help. Unfortunately, these are not exposed in the blueprint itself, so you need an extra blueprint (as mentioned before) after to control via variables