Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to know the orientation of the rope ends
#3
(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);
        }


    }


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: How to know the orientation of the rope ends - by jayanaveenaa - 25-05-2023, 01:26 PM