Devlog: Making Cables Work Better
One thing kept showing up during playtests: Players weren't looking at the cables. That was a problem.
Cables in Rayborne aren't just decoration. They connect lasers with other devices, showing what powers what and helping players understand the logic behind each puzzle.
If players don't notice them, they can miss important information and make puzzles much harder than intended. So we decided to redesign them.
What's new?
Instead of static cables, they now feature a subtle animated energy flow moving through them. The result is surprisingly impactful:
⚡ The direction of energy flow is immediately visible. 👀 Cables naturally catch the player's attention. 🧩 It's easier to follow connections between puzzle elements. ✨ And they simply look much better.
Sometimes a small visual change can have a big impact on gameplay readability.
How we built it?
The challenge was that our cables are generated procedurally using splines. Each cable is made from multiple spline mesh segments, and every segment can be stretched by a different amount to follow the curve. Using the original mesh UVs caused the animation speed to change between segments, making the energy flow look inconsistent.
To solve this, we:
Generated the cable using spline mesh components.
Calculated each segment's position along the spline.
Passed that information into the material using Custom Primitive Data.
Rebuilt the UV mapping inside the shader using the actual distance along the cable instead of the mesh's original UV coordinates.
Animated the texture using this continuous distance-based coordinate, creating one smooth flow across the entire cable.
The result is a continuous animation that stays consistent no matter how many segments the cable contains or how much each segment is stretched.
Hopefully, players will never lose track of cable connections again. :)
