Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: josemendez
15-09-2025, 04:32 PM
» Replies: 1
» Views: 192
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 3,113
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 282
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 557
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 796
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 865
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 602
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 565
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 1,068
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 915

 
  Getting Length of Rope Between Two Points
Posted by: anonzy - 23-06-2020, 01:00 AM - Forum: Obi Rope - Replies (1)

Hey,

I was wondering if there was any way to calculate the current length of a rope between two specified control points.

Is this possible?

Thanks for the help!

Print this item

  Confused about practical use of substepping Unity Physics
Posted by: protomenace - 22-06-2020, 05:31 AM - Forum: General - Replies (4)

I just got done debugging an awful bug related to sub-stepping Unity physics. 

According to http://obi.virtualmethodstudio.com/tutor...aters.html, substepping Unity physics is necessary when using more than 1 substep and performing accurate collisions with Rigidbodies.


I have a game where the player controls a quadcopter drone. To simulate the propellers of my drone, I apply an upward force in FixedUpdate. I have the drone calibrated such that the force applied in FixedUpdate is equal to the mass of the drone, such that under normal circumstances, the drone perfectly hovers in place.

I've been messing around with ObiRope, and got it working somewhat well, but I found that whenever I had an Obi rope in the scene, my drone was no longer capable of hovering in place. I thought maybe the mass of an attached rope was pulling the drone down. So I started decoupling the rope and the drone. I got to a point where the two were in completely separate GameObject hierarchies, nowhere near each other in the scene, and still the presence of the rope in the scene was causing my drone to be incapable of hovering.

Then I started playing around with the ObiFixedUpdater I was using for my rope and I found that if I disabled "Substep Unity Physics" on the updater, my drone was magically able to hover again! I dug into the source code for ObiFixedUpdater and found that it directly calls https://docs.unity3d.com/ScriptReference...ulate.html. So I began to realize the issue with my drone. My drone was falling because Physics was being simulated, including gravity forces, but my FixedUpdate was not being called during this extra Physics.simulate.

I searched these forums and found this post: http://obi.virtualmethodstudio.com/forum...ml#pid6497 where it is suggested to use the ObiUpdater.OnBeginStep callback instead of FixedUpdate to apply forces. So this leaves me confused again and with more questions:

  • Doesn't calling Physics.Simulate in addition to the normal unity physics update loop essentially cause Unity's physics simulation to proceed faster than realtime?
  • Am I supposed to disable Physics.autoSimulation to use substepping with a FixedUpdater?
  • Wouldn't I effectively get the same result from reducing Unity's physics timestep rather than doing the complicated process of substepping Unity physics and then replacing all of my FixedUpdate calls with OnBeginStep callbacks? (Or am I supposed to have FixedUpdate in addition to OnBeginStep?)
Physics substepping seems barely mentioned in passing in http://obi.virtualmethodstudio.com/tutor...aters.html, and it leaves all of these questions unaswered in my mind.

Print this item

  Tshirt interaction with avatar
Posted by: Mareh - 21-06-2020, 07:13 PM - Forum: Obi Cloth - Replies (3)

Hi everyone,

I am quite new to Unity and Obi Cloth. 

I was following this movie: https://www.youtube.com/watch?v=usXaFr6N630&t=106s

This is exactly what I am trying to do, but for me it looks like my avatar is not interacting with tshirt. I attach screens how does it look in my project. 

Basically when I press play nothing is happening, when in play I go to the scene view and rotate my avatar manually I also do not see any movement of the tshirt. I really do not know what I am missing.

Thanks in advance for help.



Attached Files Thumbnail(s)
       
Print this item

  Different types of fabrics
Posted by: FDany90 - 21-06-2020, 05:29 PM - Forum: Obi Cloth - Replies (1)

Hi everyone!. I am daniel. I have been a game designer and programmer at unity for several years.

I am thinking of buying the plugin, but I am not sure.

I am creating a virtual clothing tester online. I need to create different types of fabrics/tissues and clothes (Cotton, Silk, Jean, Leather, etc.) With dinamic sizes that fixes in the customized avatar that the user creates with his body measurements.

Do you think it will be possible to create the different interactions between the cloth of a particular fabric type and the avatar skin with different types and sizes of body?

For example the image i attach.


I don't need animations. Just that the clothes make the necessary folds / wrinkles when the clothes are big or doesn not fit well.



Thanks in advance



Attached Files Thumbnail(s)
   
Print this item

  Prevent another rope go through each other
Posted by: tuandoan - 21-06-2020, 03:28 PM - Forum: Obi Rope - Replies (1)

Hi all,
I'm new in Obi Rope
I have a problem with Obi Rope.
I want to prevent 2 or more ropes go through each other. But I have a to do this.
I want to make a game like the image below
https://imgur.com/4vZLDE7
Here is my video 
https://youtu.be/_q7sJlBAROY
Thanks in advance. Have a good day!

Print this item

  ObiRopeCursor documentation is out of date
Posted by: protomenace - 20-06-2020, 07:58 PM - Forum: Obi Rope - Replies (2)

I'm trying to use ObiRopeCursor to grow a rope for a Harpoon launcher (also running into other issues as per http://obi.virtualmethodstudio.com/forum...-2325.html). The documentation for the ropecursor (http://obi.virtualmethodstudio.com/tutor...ursor.html) mentions a Normalized Coord property. However this property no longer seems to exist. Instead, the cursor contains two properties: "sourceMu" and "cursorMu". http://obi.virtualmethodstudio.com/docs/...ursor.html

Is there updated documentation I'm missing somewhere? What is the appropriate way to set the position of new particles with ObiRopeCursor? What do "sourceMu" and "cursorMu" do?

   

Print this item

  ObiRopeCursor.ChangeLength causes IndexOutOfRangeExceptions
Posted by: protomenace - 20-06-2020, 05:31 PM - Forum: Obi Rope - Replies (1)

I'm trying to create a harpoon gun which is launched from a flying drone and hooks into whatever it collides with. The rope blueprint looks like this:

   

To shoot the harpoon, I'm starting with a very short rope, and increasing the length of the rope along with the velocity of the tip of my harpoon in FixedUpdate. The rope is attached to both the drone and the harpoon tip via ObiParticleAttachment.

Code:
using Obi;
using UnityEngine;

public class HarpoonLauncher : MonoBehaviour
{
    public ObiRopeCursor ropeCursor;
    public float HarpoonVelocity = 10f;
    public HarpoonTip HarpoonTip;
    public Transform HarpoonConnection;
    public Transform TipSpawnPosition;
    public ObiSolver ObiSolver;
    public ObiRope Rope;
    public float InitialRopeLength = 1f;
    public float MaxRopeLength = 5f;
    public ObiParticleAttachment TipAttachment, DroneAttachment;

    public ObiRopeBlueprint RopeBlueprint;
    bool isShooting = false;

    // Start is called before the first frame update
    void Start() {
        InitialRopeLength = Rope.restLength;

        HarpoonTip.OnHarpoonEnter += WhenHarpoonImpacts;
    }

    private void OnDestroy() {
        HarpoonTip.OnHarpoonEnter -= WhenHarpoonImpacts;
    }

    private void WhenHarpoonImpacts(HarpoonTip source, Collider impact) {
        isShooting = false;
        // Readjust length after impact
        ropeCursor.ChangeLength((TipSpawnPosition.position - HarpoonTip.transform.position).magnitude + .02f);
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space)) {
            ObiSolver.gameObject.SetActive(true);
            HarpoonTip.gameObject.SetActive(true);
            ropeCursor.ChangeLength(InitialRopeLength);
            HarpoonTip.transform.position = TipSpawnPosition.position;
            Vector3 velo = TipSpawnPosition.forward * HarpoonVelocity;
            HarpoonTip.Fire(velo);
            //Rope.SetMass(.01f);
            isShooting = true;
        }
    }

    private void FixedUpdate() {
        if (isShooting) {
            Debug.Log($"{Rope.restLength}");
            if (Rope.restLength >= MaxRopeLength) {
                isShooting = false;
            }
            else {
                //Rope.SetMass(.01f);
                ropeCursor.ChangeLength(Rope.restLength + HarpoonTip.GetComponent<Rigidbody>().velocity.magnitude * Time.fixedDeltaTime);
                //CurrentRopeLength += HarpoonTip.velocity.magnitude;
            }
        }
    }
}


When I run this code, i get an IndexOutOfRangeExceptions in FixedUpdate after shooting the harpoon:
Quote:IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.ObiActor.SwapWithFirstInactiveParticle (System.Int32 actorIndex) (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:420)
Obi.ObiActor.ActivateParticle (System.Int32 actorIndex) (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:434)
Obi.ObiRopeCursor.AddParticleAt (System.Int32 index) (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs:118)
Obi.ObiRopeCursor.ChangeLength (System.Single newLength) (at Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs:203)
HarpoonLauncher.FixedUpdate () (at Assets/Scripts/HarpoonLauncher.cs:60)

However the rope length still seems to change! So what am I doing wrong here?

Print this item

  Cannot find Edit Particles button/editor
Posted by: protomenace - 20-06-2020, 04:34 PM - Forum: Obi Rope - Replies (2)

According to http://obi.virtualmethodstudio.com/tutor...ments.html and http://obi.virtualmethodstudio.com/tutor...iting.html there is supposed to be an "Edit Particles" button on my ObiRope component. But I can't find this anywhere. I'm using ObiRope 5.3.

Attaching images from my ObiRope inspector and my scene view. I don't see the button anywhere. What am I missing?

   
   

Print this item

  Access ObiEmitter class in C#
Posted by: fluidman84 - 20-06-2020, 04:19 AM - Forum: Obi Fluid - Replies (2)

I'm sure that there is a easy answer to this, but I've looked all over for the correct namespace to gain access to the speed property on a ObiEmitter component. In the docs I only see Obi.ObiActor referenced, but my IDE only identifies Obi.ObiCharacter. 

What am I missing to get access to ObiEmitter?

Print this item

  How to reverse the backstop
Posted by: asimofu_ok - 19-06-2020, 09:31 AM - Forum: Obi Cloth - No Replies

I applied Obi Skinned Cloth to the bag-shaped object seen from the inside.

I want to set the backstop because I don't want the bag to be recessed inward,
but the backstop is set outward because the normal is facing inward.

I want to keep the normal inward for collisions and shaders,
so is there a way to reverse the backstop?

   

Sorry for the very rare case question.

Print this item