Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Match object orientation with a rope section (or particle)
#1
Hi,

I'm trying to create a 3D ring around the specific point of the rope. So far I have been able to set the position correctly using ObiPathSmoother.GetSectionAt() and some TransformPoint(). However, I couldn't get the orientation right. The ObiPathFrame given to me from ObiPathSmoother.GetSectionAt() do have main axis data (normal, binormal, and tangent), however, they seem to not align with the section orientation. It sometimes align sometimes don't (I Debug.DrawRay all 3 values and they're not align). Am I missing something here?

I'm using rope, so I think I can't use the orientation of the particle itself as I thought rope don't simulate particle orientation?

Here's the code for setting both position and rotation.
Code:
ObiPathFrame section = mainRopePath.GetSectionAt(normalizeRopePoseOf62CM);
ring62CMHighlight.transform.position = mainRopePath.transform.TransformPoint(section.position);
ring62CMHighlight.transform.rotation = Quaternion.LookRotation(section.tangent, section.binormal);

Thanks
Reply


Messages In This Thread
Match object orientation with a rope section (or particle) - by Alberos - 21-08-2023, 12:04 PM