Search Forums

(Advanced Search)

Latest Threads
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
Yesterday, 05:32 AM
» Replies: 0
» Views: 69
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,773
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 189
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 438
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 690
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 779
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 518
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 491
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 989
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 835

 
  Lying Rope On Surface
Posted by: r3dmatt - 09-03-2021, 07:37 PM - Forum: Obi Rope - Replies (1)

Hello! 

I want to make a model where some roots going around a spherical object. Like on the brain I have attached.

It is possible to make it with rope? If yes, how? If not, what do you recommend for me to do that?



Attached Files Thumbnail(s)
   
Print this item

  OBI ROPE SHAKING POINT
Posted by: Furyz - 07-03-2021, 11:33 AM - Forum: Obi Rope - Replies (6)

Hi guys, I am having a shaking problem at the attachment point of the rope (obi grappling hook script) can you help me? Please see gif Sonrisa



Attached Files Thumbnail(s)
   
Print this item

  Obi fluid collision
Posted by: JskT01 - 06-03-2021, 02:51 AM - Forum: Obi Fluid - Replies (9)

I have a container with liquid which I move, I want it to do something when it spills and collides with the floor, I am using an event to check when it collides with the floor, but the performance when using this script drops from 50 fps to 17fps what I could do ?

Code:
    void Awake()
    {
        solver = GetComponent<Obi.ObiSolver>();
    }
    
    void OnEnable()
    {
        solver.OnCollision += Solver_OnCollision;
    }

    void OnDisable()
    {
        solver.OnCollision -= Solver_OnCollision;
    }
    void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
    {
        var world = ObiColliderWorld.GetInstance();
        foreach (Oni.Contact contact in e.contacts)
        {
            // this one is an actual collision:
            if (contact.distance < 0.01)
            {
                ObiColliderBase collider = world.colliderHandles[contact.other].owner;
                if (collider.name!="Piso")
                {
                    Debug.Log(collider.name);
                    solver.OnCollision -= Solver_OnCollision;
                    // do something with the collider.
                }
            }
        }
    }

Print this item

  Slave mesh edges detached
Posted by: JhonatasFarias - 05-03-2021, 09:36 PM - Forum: Obi Cloth - No Replies

[Image: unknown.png]

Hi there,
I still didn't get why this is happening to my model when my character collide with the cloth mesh, it's a obi proxy with a lower mesh resolution driving the slave.
Any ideas?


(05-03-2021, 09:36 PM)JhonatasFarias Wrote: [Image: unknown.png]

Hi there,
I still didn't get why this is happening to my model when my character collide with the cloth mesh, it's a obi proxy with a lower mesh resolution driving the slave.
Any ideas?


Actually I solved it, I guessed the corner was too sharp, so I made a more curved shape and the gap doenst show, I guess that's due to the vertexes or faces angle.
Leaving here this post for anyone with the same issue.

[Image: unknown.png]

Print this item

  How to drag a rope from any point of the rope
Posted by: wakin001 - 05-03-2021, 04:45 PM - Forum: Obi Rope - Replies (2)

I created a rope, and when I touch the rope and need to drag it from the touch point.

I can get the touch point on the rope, but how can I drag it?

I added an ObiParticleAttachment on the ObiRope, and I try to find the control point near my touch point, but I found all control points are the same and will never change, after changing the position of the rope.

So can I find the correct control point in runtime?

Print this item

  Attaching a prefab to each particle in a rope.
Posted by: hecali_aj - 05-03-2021, 11:29 AM - Forum: Obi Rope - Replies (2)

Hello,
Is there a way to attach a gameobject/prefab to rope particles? I was thinking of creating the rope through script and attaching a prefab to each particle in the rope.
Is there a better way to do this? Is using pin constraints the solution to this one?

Print this item

Pregunta Is there a way to calculate "bulks"?
Posted by: Samadhi - 04-03-2021, 10:41 PM - Forum: Obi Fluid - Replies (1)

Is there a way to know if a particle is part of a bigger chunk of fluid?

I want to do a system in which two emitters emit the same fluid with different colors each, and as they mix together, so does the color of all the fluids. Similar to the "FluidMixing" sample scene, with the difference in that scene the color change occurs on an individual particle basis; here I want it to happen to everything connected to the bigger mass of fluid, bus skip droplets that aren't part (yet) of the bigger mass.

On a somewhat related question. In that "FluidMixing" sample scene I saw the main script in charge of changing the color uses the "userData" property; according to the manual, that property holds data that was... well, placed there by the user. But I didn't saw any other place in which those values could have been modified (or added, to begin with), so I'm not sure how that works.

Thanks.

Print this item

  IndexOutOfRange in ClothProxy on Android
Posted by: JanikH - 04-03-2021, 03:53 PM - Forum: Obi Cloth - Replies (3)

Hi,

when running our game on Android we're currently running into the following exception:

Code:
IndexOutOfRangeException: Index was outside the bounds of the array.
  at Obi.ObiClothProxy.UpdateSkinning (Obi.ObiActor actor) [0x002ab] in ...\Assets\Obi\Scripts\Cloth\Rendering\ObiClothProxy.cs:132
  at Obi.ObiClothRendererBase.UpdateRenderer (Obi.ObiActor actor) [0x0012b] in ...\Assets\Obi\Scripts\Cloth\Rendering\ObiClothRendererBase.cs:191
  at Obi.ObiActor.Interpolate () [0x0010d] in ...\Assets\Obi\Scripts\Common\Actors\ObiActor.cs:1189
  at Obi.ObiSolver.Interpolate (System.Single stepTime, System.Single unsimulatedTime) [0x000a7] in ...\Assets\Obi\Scripts\Common\Solver\ObiSolver.cs:1622
  at Obi.ObiUpdater.Interpolate (System.Single stepDeltaTime, System.Single accumulatedTime) [0x0002f] in ...\Assets\Obi\Scripts\Common\Updaters\ObiUpdater.cs:110
  at Obi.ObiFixedUpdater.Update () [0x00007] in ...\Assets\Obi\Scripts\Common\Updaters\ObiFixedUpdater.cs:62

This does not occur when running in the editor.
We're using ObiCloth 6.0.1 with Unity 2020.2.4f1.
I made sure to regenerate the blueprint and rebind the skin map.

Any pointers as to what the issue may be?

Print this item

Pregunta Calculating the Amount of Fluid
Posted by: Oziko - 04-03-2021, 03:53 PM - Forum: Obi Fluid - Replies (2)

I'm doing a game where I carry water in a container. The amount of water remaining in the container is different in each section.

I want to give a percentage of how much water is left in this container. How am I going to do this?

Print this item

  Adding & Removing ObiParticleAttachments at runtime
Posted by: MartinBischoff - 04-03-2021, 03:20 PM - Forum: General - Replies (1)

I want to dynamically add and remove ObiParticleAttachments to individual particles of Softbodies at runtime.
My current implemenation looks like this:


Code:
private void Grasp(ObiActor actor, int index)
        {
          attachment = actor.gameObject.AddComponent<ObiParticleAttachment>();
            attachment.target = transform;
            attachment.particleGroup = actor.blueprint.AppendNewParticleGroup(groupName);
            groupIndex = actor.blueprint.groups.Count;
            attachment.particleGroup.particleIndices = new List<int> { index };
            attachment.compliance = 0;
            attachment.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
            IsGrasping = true;

            solver.RemoveActor(actor);
            solver.AddActor(actor);
        }

private void Release()
        {
            Destroy(attachment);
            actor.blueprint.RemoveParticleGroupAt(groupIndex);
            solver.RemoveActor(actor);
            solver.AddActor(actor);
        }




I can succesfully preform Grasp() and Release() once. The second time I call Grasp() the actor moves only halfway to the attachments target. It seems like the solver did not fully forget the previous attachments.

I experimented several hours with the methods suggested in Scripting Constraints tutorial without success.

I don't want to add forces to particles in this script as it is done in ObiParticleDragger but rather activate & deactivate a pin/attachment constraint.

Thank you so much for your support!


tl/dr:
How do I properly register and unregister ObiParticleAttachments at runtime?

Print this item