25-05-2023, 01:26 PM
(25-05-2023, 08:56 AM)josemendez Wrote: Hi there,
How and where are you applying the force, (directly to rope particles, or to an object attached to them?) Could you share your code?
Rope particles have no orientation, they're just points in space. Any force you add to them will be interpreted as-is, not reoriented to any particular direction.
kind regards,
I have attached a gameobejct tot eh rope' end using particle attachment condition and applied the force through that gameobject.
private IEnumerator ThrowObjectWithDelay(float delay)
{
yield return new WaitForSeconds(delay);
rb.isKinematic = false;
Vector3 throwDirection = throwDirect.normalized;
rb.AddForce(throwDirection * force, ForceMode.VelocityChange);
isThrown = true;
}
private void FixedUpdate()
{
if (isThrown)
{
rb.AddForce(Vector3.down * gravity, ForceMode.Acceleration);
}
}