Inu Games - Modular Snap System Runtime

Hi, I was writing an explanation about how to use splines, then I found that at some moment I introduced a new feature that broke the spline handling, so now I’m fixing that, also adding the preview for spline meshes to the preview actor.

Btw, how it’s supposed to work: the plugin sees the endpoints of the spline as sockets. Their names are the name of the spline component plus number. For example if the spline component is called “Spline” the sockets are called “Spline_0” and “Spline_1”. Then, in order to snap an actor containing the spline to something, you just need to add SplineComponent to the SourceComponents array in the snap parameters struct.

If you want to snap to the spline endpoints, then it’s a little bit more complicated. First, you need to add SplineComponent to the Target Components array of the param struct. Then the spline itself has no collision, so you need something with the collision for the plugin to see. If you have spline meshes with collision on the spline then you can use those, otherwise I spawn a simple sphere collision around each endpoint. You also need to add the component class you use for collision to the target components list.

As a workaround you can put a static mesh with socket placed at each spline endpoint. If you can use this then it’s actually faster, because spline handling is special and takes more steps.