Setting phases and using the inverse transformed position from the collider solved the issue.
HOWEVER, it still freezes the rotation of both the platform and the helicopter. Why is this?
Nevermind. Solved using the regular ObiParticleAttachment components.
Code:
batch.AddConstraint(0, m_ObiCollider, m_ObiCollider.transform.InverseTransformPoint(m_HelicopterAnchorPoints[i].position), Quaternion.identity);
batch.AddConstraint(blueprint.activeParticleCount - 1, Pallet.GetObiCollider(), Pallet.GetObiCollider().transform.InverseTransformPoint(anchorPoint.position), Quaternion.identity);
HOWEVER, it still freezes the rotation of both the platform and the helicopter. Why is this?
Nevermind. Solved using the regular ObiParticleAttachment components.
Code:
// Get components
ObiParticleAttachment mainRopeAttachment = m_Ropes[i].gameObject.AddComponent<ObiParticleAttachment>();ObiParticleAttachment palletAttachment = m_Ropes[i].gameObject.AddComponent<ObiParticleAttachment>();
// Find the particle groups
var groups = m_Ropes[i].blueprint.groups;
// Attach sub rope to main rope
mainRopeAttachment.target = m_ObiCollider.transform;
mainRopeAttachment.particleGroup = groups[0];
mainRopeAttachment.attachmentType = ObiParticleAttachment.AttachmentType.Static;
// Attach the rope to the pallet
palletAttachment.target = m_Pallet;
palletAttachment.particleGroup = groups[groups.Count - 1];
palletAttachment.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;