Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  [Solved] Creating a ribbon
#4
(23-05-2024, 02:01 PM)Elias Wrote: Shouldn't the initial rotation in one direction stay the same then, if forces are only ever applied in two directions?

Hi Elias,

Forces are part of physics, they play no role in rendering.

During rendering, approximate orientations for rope particles are derived from particle positions, since the particles themselves lack orientation. The direction from one particle to the next determines 2 rotational degrees of freedom, but leaves the 3rd one free (rotation along the vector pointing from one particle to the next). This 3rd DOF is fixed using the cross product with the world's "up" vector, which yields a different torsion depending on which side of the "up" vector the rope is.

(23-05-2024, 02:01 PM)Elias Wrote: I considered using a rod, but I do need the freedom of movement I get from a rope.[/font][/size][/color]

Rods offer the same freedom of movement than a rope, but can be optionally made to keep their rest shape. Furthermore they also fully simulate torsion. Unless you need to cut/tear them or resize them using a cursor (neither of which are supported by rods) a rod would be a better match for your use case.

(23-05-2024, 02:01 PM)Elias Wrote: I'd be glad if you could help me modify the line renderer, that might do the trick!

Open up ObiRopeLineRenderer.cs, and around line 120 replace this:

Code:
normal.x = curve.Data[i].position.x - localSpaceCamera.x;
normal.y = curve.Data[i].position.y - localSpaceCamera.y;
normal.z = curve.Data[i].position.z - localSpaceCamera.z;
with this:
Code:
normal = curve.Data[i].binormal;

That should get you close to your desired result.

kind regards,
Reply


Messages In This Thread
[Solved] Creating a ribbon - by Elias - 23-05-2024, 01:22 PM
RE: Creating a ribbon - by josemendez - 23-05-2024, 01:36 PM
RE: Creating a ribbon - by Elias - 23-05-2024, 02:01 PM
RE: Creating a ribbon - by josemendez - 27-05-2024, 06:20 PM
RE: Creating a ribbon - by Elias - 28-05-2024, 08:34 AM