Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiSolver orientations return 0,0,0,0
#1
the position is return the correct Vector3:

Code:
var ropeParticleUpPosition = _solverPosition + rope.solver.positions[upChainParticleIndex].ToVector3();

but if I want to get the rotation:

Code:
var ropeParticleUpRotation = rope.solver.orientations[upChainParticleIndex];
that returns allways 0,0,0,1, also eulerAngles return 0,0,0
Reply
#2
(18-09-2022, 12:31 PM)lacasrac Wrote: the position is return the correct Vector3:

Code:
var ropeParticleUpPosition = _solverPosition + rope.solver.positions[upChainParticleIndex].ToVector3();

but if I want to get the rotation:

Code:
var ropeParticleUpRotation = rope.solver.orientations[upChainParticleIndex];
that returns allways 0,0,0,1, also eulerAngles return 0,0,0

Hi!

Ropes do not use orientations, only rods do as explained in the manual:
http://obi.virtualmethodstudio.com/manua...setup.html

Quote:Ropes: Ropes are built by chaining particles using distance and bend constraints. Since regular particles have no orientation (only a position), torsion effects cannot be simulated , and ropes cannot retain its rest shape.

Rods: Rods are built by chaining oriented particles using stretch/shear and bend/twist constraints. They are much more sophisticated than ropes, can simulate torsion affects and retain their rest shape.

If all you want is the local rope orientation, you can get that by using ObiPathSmoother.GetSectionAt(). It will return an orthonormal frame (ObiPathFrame struct, which contains interpolated position, normal, tangent, binormal, color and thickness) for any point in the rope, works also in-between particles.
Reply