11-11-2025, 09:17 AM
(This post was last modified: 11-11-2025, 09:18 AM by goosejordan.)
(11-11-2025, 08:07 AM)josemendez Wrote: Hi!
Unfortunately rope twist cannot be controlled at all.
During simulation, rope particles have no twist - in fact, they don't have an orientation at all, it's just positions in space. During rendering, parallel transport is used to determine the smallest change in orientation that points from one particle to the next. This is implemented in BurstPathSmootherRenderSystem.cs/ComputePathSmootherRenderSystem.cs.
Taking the Burst one as example: in ParallelTransportJob, particle data goes in and a list of BurstPathFrame structs comes out. Each BurstPathFrame is initialized using its Reset() method, which sets orthonormal normal, tangent and bitangent vectors. You may be able to force a specific initial orientation by choosing vectors aligned with a desired orientation.
kind regards
Thanks, it worked

I updated transport with the following bias upward. I understand with will break the twist effect if one would for instance make a telephone cable, but it works for my case, the rope looks much more stable now.
Code:
public void Transport(in BurstPathFrame frame, float twist)
{
// Calculate delta rotation:
quaternion rotQ = Quaternion.FromToRotation(tangent, frame.tangent);
quaternion twistQ = quaternion.AxisAngle(frame.tangent, math.radians(twist));
quaternion finalQ = math.mul(twistQ, rotQ);
// Rotate previous frame axes to obtain the new ones:
normal = math.mul(finalQ, normal);
//binormal = math.mul(finalQ, binormal); //Calculated later with cross product
tangent = frame.tangent;
position = frame.position;
thickness = frame.thickness;
color = frame.color;
// --- Binormal Up-Bias (only affects twist) ---
const float upBiasStrength = 0.2f;
float3 up = new float3(0,1,0);
normal += up * upBiasStrength;
normal = math.normalize(normal - math.project(normal, tangent));
binormal = math.cross(normal, tangent);
}
