Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: josemendez
7 hours ago
» Replies: 1
» Views: 150
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,926
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 243
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 523
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 753
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 827
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 569
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 536
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,040
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 880

 
  Obi Rope on moving rigidbody?
Posted by: lela_tabathy - 28-02-2023, 10:43 AM - Forum: Obi Rope - Replies (1)

I'm adding an Obi Rope onto a moving rigidbody (a ship moving in the water). However, the rope falls immediately through the collider (when my ship's rigidbody is set to kinematic, everything works). Is it possible to use the rope on a moving rigidbody?

Also, is it possible to have the rope be completely static, like a regular static mesh? Some of my ropes don't need to be interacted with.

Print this item

  Changing rope length using variable
Posted by: rohit_dhak - 23-02-2023, 11:20 AM - Forum: Obi Rope - Replies (3)

Hello,

So I am trying to control/change rope length using control input received from python.
I am successfully receiving the data from python side (checked it by debugging in unity console).


However now when I am trying to change the rope length using

Code:
cursor.ChangeLength(control_ip);

I am not sure if I am doing anything wrong, Its just not working, control_ip is a float.

I have a script attached to cable from where I am getting the rope and cursor object into my main control script.

The main control script is as following:

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Globalization;
using System.Net.Sockets;
using UnityEngine;
using Obi;


public class Control_main : MonoBehaviour
{
// ------------------------------------------------------------------------------------------------------------------------------------------------//
    // Declaring variables and objects

    // Rope and cursor objects to manipulate cable lengths
    public ObiRope rope_1;
    public ObiRope rope_2;
    public ObiRope rope_3;
    public ObiRope rope_4;

    public ObiRopeCursor cursor_1;
    public ObiRopeCursor cursor_2;
    public ObiRopeCursor cursor_3;
    public ObiRopeCursor cursor_4;

    public float speed;


    // Current cable lengths
    public float c1_len;
    public float c2_len;
    public float c3_len;
    public float c4_len;

    // Robot object and position
    public GameObject robot_obj;
    public Vector3 robot_pos;

    // Control input
    public List<float> control_ip = new List<float>();

    // Control input variables (data received from python)
    public float c1_control_ip;    
    public float c2_control_ip;
    public float c3_control_ip;
    public float c4_control_ip;

    // Control script objects
    public GameObject c1;
    public GameObject c2;
    public GameObject c3;
    public GameObject c4;
    public GameObject listener;
    public GameObject sender;

    // Other scripts
    public Control_C1 c1Script;
    public Control_C2 c2Script;
    public Control_C3 c3Script;
    public Control_C4 c4Script;
    public TCPListenPipe listenerScript;
    public TCPSendPipe senderScript;

    // Misc
    public float delay = 10;
    float timer;
    bool running = true;

    // Simulation Status
    public string sim_stat = "sim_stat";
// ------------------------------------------------------------------------------------------------------------------------------------------------//

    // Start method
    public void Start()
    {
        // Waiting for simulation to be ready
        StartCoroutine(sim_steady());

        // Getting all required scene objects
        GetSceneObjects();

    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//

    // Coroutine to wait for the simulation to get to steady state
    IEnumerator sim_steady()
    {
        sim_stat = "Simulation started";                    // changing simulation status to "started"
        Debug.Log("Simulation started");
        sim_stat = "Waiting for simulation to be steady";   // changing simulation status to "waiting"
        Debug.Log("Waiting for simulation to be steady");
        yield return new WaitForSeconds(10);
        sim_stat = "Simulation ready to use";               // changing simulation status to "ready to use"
        Debug.Log("Simulation ready to use");
    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//
  
    // Method to get scene objects and parameters
    public void GetSceneObjects()
    {
        // Access cable objects
        c1 = GameObject.Find("Cable1");
        c2 = GameObject.Find("Cable2");
        c3 = GameObject.Find("Cable3");
        c4 = GameObject.Find("Cable4");
        listener = GameObject.Find("TrainingEnv");
        sender = GameObject.Find("TrainingEnv");

        // Access other scripts
        c1Script = FindObjectOfType<Control_C1>();
        c2Script = FindObjectOfType<Control_C2>();
        c3Script = FindObjectOfType<Control_C3>();
        c4Script = FindObjectOfType<Control_C4>();
        listenerScript = FindObjectOfType<TCPListenPipe>();
        senderScript = FindObjectOfType<TCPSendPipe>();


        // Getting rope and cursor objects
        rope_1 = c1Script.rope1;
        rope_2 = c2Script.rope2;
        rope_3 = c3Script.rope3;
        rope_4 = c4Script.rope4;

        cursor_1 = c1Script.cursor1;
        cursor_2 = c2Script.cursor2;
        cursor_3 = c3Script.cursor3;
        cursor_4 = c4Script.cursor4;

        speed = c1Script.speed;
    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//

    // Method to receive robot position
    public void getRobPos()
    {
        // Getting robot object and position from TCPSendPipe
        robot_obj = senderScript.robot;
        robot_pos = senderScript.robPos;
    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//

    // Method to get current cable lengths
    public void getCableLen()
    {
        // Access cable lengths (from Cable control scripts - cable observations)
        c1_len = c1Script.rope_c1;
        c2_len = c2Script.rope_c2;
        c3_len = c3Script.rope_c3;
        c4_len = c4Script.rope_c4;
    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//

    // Method to receive actions
    public void Receive_actions()
    {
        // Access control inputs (from TCPListenPipe - data received from python)
        c1_control_ip = listenerScript.c1_action;
        c2_control_ip = listenerScript.c2_action;
        c3_control_ip = listenerScript.c3_action;
        c4_control_ip = listenerScript.c4_action;
    }
   
// ------------------------------------------------------------------------------------------------------------------------------------------------//
   
    // Method to perform control action
    public void set_control()
    {
        while (c1_len != c1_control_ip)
        {
            Debug.Log("Changing Cable Lengths");
            cursor_1.ChangeLength(c1_control_ip);
            if(c1_len == c1_control_ip)
            {
                Debug.Log("Action Completed");
                break;
            }
        }
    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//
    // Method to print all data for debugging
    public void Debugging_data()
    {  
        Debug.Log("Current Cable Lengths: " + "\n");
        Debug.Log("cable 1:" + c1_len + "\n" + "cable 2 :" + c2_len + "\n" + "cable 3 :" + c3_len + "\n" + "cable 4 :" + c4_len + "\n");

        Debug.Log("Cable Control Inputs: " + "\n");
        Debug.Log("c1_control_ip :" + c1_control_ip + "\n" + "c2_control_ip :" + c2_control_ip + "\n" + "c3_control_ip :" + c3_control_ip + "\n" + "c4_control_ip :" + c4_control_ip + "\n");
       
        Debug.Log("Robot Position: " + "\n");
        Debug.Log("position: " + robot_pos);
    }

// ------------------------------------------------------------------------------------------------------------------------------------------------//

    // Update method (performs continuous control operation)
    void Update()
    {
        if (running)
        {
            if (sim_stat == "Simulation ready to use")
            {
                // Getting Control Actions
                Receive_actions();

                // Getting Current Cable Lengths
                getCableLen();

                // Getting Current Robot Position
                getRobPos();



                // Setting Control Actions
                //set_control();

                // Printing All Data
                Debugging_data();
            }
        }
    }
// ------------------------------------------------------------------------------------------------------------------------------------------------//
}

Any help is much appreciated.
Thank You.

Print this item

  Rendering rope and performance cost
Posted by: Zombie1111 - 22-02-2023, 06:33 PM - Forum: Obi Rope - Replies (5)

I have been experimenting with using colliders and joints instead of using obi rope because it may fit my game better. However when I got the joints to behave properly I thought I could just modify obi ropes render components a little to get it to work with my joints, but it unfortunately was not that easy.

I have two questions!
1: I tried disabling the obiPathSmoother component and it decreased the performance cost of each rope by around 50%. Is really 50% of the performance cost of a rope just rendering it?

2: Is there anyway I could use obi rope to render a rope using joints? I have a array of positions I want the rope to go through. How does obi rope know where to render the rope?

Print this item

  Obi Cloth Particle Attachment
Posted by: BobPrespective - 21-02-2023, 05:10 PM - Forum: Obi Cloth - Replies (1)

Hi all,

I have an issue regarding Obi Particle Attachments in regards with the Obi Cloth.

I have the setup (as visualized in the attachments) with 3 ObiParticle Attachments
2 attachments are on object X with Particle Group 1
1 attachment is on object Y with Particle Group 2

(i am using Objects at the X and Y position to detect overlap for when it should be attached together, and 1 attachment to switch between the 2 different object to actually snap them together)

When changing the Target manually via the inspector of one of the X Attachments to the same Target as the Y attachment the cloth forms a circle and the position of the particles is snapped together,
this behaviour is what i am looking for but instead of manually setting the Target i want to do the same via script.
Instead of snapping the X particles to the Y particles it seems they keep their positional offset when the Target is changed.

I cannot find the piece of code that would provide this change in behaviour when either setting the Target from the inspector or the Target in the ObiParticleAttachment and would like some help or clarification.

Thanks in advance.

Print this item

  rope physics on external rigidbodies
Posted by: ellioteserin - 21-02-2023, 12:51 PM - Forum: Obi Rope - Replies (2)

Hi,
Im looking at purchasing Obi Rope for a project but theres a particular feature that I would really need for it to be useful and I am wondering if it exists:
Basically, can Obi Ropes apply forces to rigidbodies that arent constrained to the rope? An example might be, could a cylinder with a dynamic rigidbody be suspended on a rope just by being placed on a rope? And could I then apply forces to that cylinder by moving the rope?
If not, I might be able to find a workaround but I couldnt see any demos of this sort of thing happening which is why I wanted to ask before purchasing.

Thanks a lot,
Elliot

Print this item

  Compatibility to Unity 2023.1
Posted by: ImpossibleRob - 20-02-2023, 09:33 PM - Forum: Obi Rope - Replies (8)

The documentation how to activate the burst solver is still stating rather old version numbers it seems. I try to get it running in 2023.1 but there Burst is quite advanced and the collections package does not contain needed types anymore so there will be many compile errors. 

How can I get the Burst backend properly activated in the new Unity and Burst versions?

Print this item

  Managing thousands of objects
Posted by: ImpossibleRob - 20-02-2023, 09:31 PM - Forum: Obi Rope - Replies (4)

I have a game where the user can place many objects, potentially thousands, and also use a couple of ropes which should then react to these. The issue is, the ObiUpdater becomes incredibly slow looping through all the obi colliders and updating them. It reaches easily 500ms for only 4000 objects on a high-end pc per frame. 

What are recommendations to handle such scenes? Are there optimization tricks or settings I can tweak?

Print this item

  Effect like Mystical Mixing game
Posted by: littleanchovy - 20-02-2023, 12:33 PM - Forum: Obi Fluid - Replies (3)

Hey, i want to achieve this color changin effect on liquids, is it possible to achieve with Obi? 

https://youtu.be/FeoUfQn-uvk?t=5

Print this item

  should I buy obi rope for my use
Posted by: edhoo - 15-02-2023, 10:31 AM - Forum: Obi Rope - Replies (1)

.This asset look to be perfect for my use, but I have few questions before buying it:

- I need the rop to break in a precise point and a precise tension.

The rope need to be at a precise distance between the strating point and the ending point before to break, and break at the middle or a choosen point.

Is it possible?


Thank you for your answer : )

Print this item

Gran sonrisa Obstacle course / puzzle game using rope mechanics
Posted by: Destro26 - 14-02-2023, 02:57 PM - Forum: Made with Obi - Replies (1)

I've been working on an obstacle course / puzzle game for my Honours project at university and Obi rope is the backbone of the whole thing. 



Hello, I'm currently conducting user research into the game mechanics so i've been asking people to play the game then complete a questionnaire.

If you are interested in playtesting please follow the link where you can find:

  1. More information about the study
  2. A folder to be downloaded containing the game
  3. A link to the questionnaire
Game Download & Questionnaire

If you'd like more details please contact me
scott.ewing22@gmail.com

Thanks for reading!

Print this item