I am making a cable dragging system for my game but when the player drags the cable, it slowly goes into the ground. The spline debug line shows the correct placement so it’s only the mesh that is not aligned properly.
The function that isn’t working properly is the “Get Location at Distance Along Spline” and I’m not sure why.
Based on the information provided, it seems that the issue lies with the alignment of the mesh when the cable is being dragged in the game. The “Get Location at Distance Along Spline” function is not functioning as expected, causing the mesh to slowly sink into the ground instead of staying aligned with the spline debug line. It is worth noting that the rounded surface does not seem to be the cause of the problem, as the issue persists even when tested on a flat surface. To resolve this, you may need to investigate and debug the “Get Location at Distance Along Spline” function to ensure it is correctly calculating the position of the mesh along the spline.
Thanks for the reply!
The problem seems to happen when using local instead of world space in the node. The problem with that is the spline’s Set Start And End node which requires positions in local space, there are already discussions about this issue and none of them has found an answer and I didn’t manage to make a transform function that works
I found out what the issue was.
The spline mesh component when spawned, was attached to the root component instead of the spline component which caused its’ relative location to shift with the rotation of the spline. Attaching the spline mesh component to the spline manually fixed the problem.