Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to know the orientation of the rope ends
#1
Hii, Just started using obi rope to make shooting rope, in which a gameobject has a projectile motion and sticks to the wall upon collision. If you notice, all the ropes, end anchors and blueprints are duplicated. For some reason, with the vector input for force, each one of them are flying off to different direction. Is there any orientation issue or end points of rope affects the motion. If you can point out the issue it will great.


Attached Files Thumbnail(s)
       
Reply
#2
(24-05-2023, 11:40 PM)jayanaveenaa Wrote: For some reason, with the vector input for force, each one of them are flying off to different direction. [/font][/size][/color]

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?

(24-05-2023, 11:40 PM)jayanaveenaa Wrote: Is there any orientation issue or end points of rope affects the motion. If you can point out the issue it will great.

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,
Reply
#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
#4
(25-05-2023, 01:26 PM)jayanaveenaa Wrote: 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);
        }


    }

Hi,

Is the attachment dynamic or static?
Is the rope set to collide with the object it is attached to, and is it attached very close to or inside the object?

Kind regards,
Reply
#5
(25-05-2023, 02:51 PM)josemendez Wrote: Hi,

Is the attachment dynamic or static?
Is the rope set to collide with the object it is attached to, and is it attached very close to or inside the object?

Kind regards,

1. The attachment is static
2. The sphere gameobject is placed close to the ends of the rope

Is there any specific method/procedure to attach anchor Game objects at the ends?
Reply
#6
(28-05-2023, 12:33 AM)jayanaveenaa Wrote: 1. The attachment is static
2. The sphere gameobject is placed close to the ends of the rope

If the attachment is static, it won't be able to impart any forces on the game object it is attached to. However if the rope is very close to the gameobject and collisions between the rope of the object are enabled, the rope might be applying forces to the object because they're colliding against each other. This can result in random forces being added to the gameobject, deviating it from the trajectory it would have otherwise. This situation is described in the manual page for attachments, see "attachments inside colliders":
http://obi.virtualmethodstudio.com/manua...ments.html

You can disable collisions either globally (in the ObiSolver component, under "constraints" foldout) or for specific particles/colliders, using collision filters. You can learn more about filters here: http://obi.virtualmethodstudio.com/manua...sions.html


(28-05-2023, 12:33 AM)jayanaveenaa Wrote: Is there any specific method/procedure to attach anchor Game objects at the ends?

Not really, the ends are just like any other point in the rope. The procedure is exactly the same regardless of the point in the rope you attach the object to.

let me know if you need further help,

kind regards
Reply