Search Forums

(Advanced Search)

Latest Threads
can you remove particles ...
Forum: Obi Softbody
Last Post: aardworm
09-07-2025, 07:09 AM
» Replies: 0
» Views: 59
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 250
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 409
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,125
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 292
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 379
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 1,053
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 351
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 212
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 5,155

 
  ArgumentNullException: Value cannot be null. Parameter name: key
Posted by: diegoaguirreh - 16-01-2021, 02:56 AM - Forum: Obi Cloth - Replies (2)

Hello everyone! 

Hope you have a great weekend. LongStory-Short Story im getting this error 

"ArgumentNullException: Value cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <9577ac7a62ef43179789031239ba8798>:0)
Obi.ObiTriangleMeshContainer.GetOrCreateTriangleMesh (UnityEngine.Mesh source) (at Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs:78)
Obi.ObiColliderWorld.GetOrCreateTriangleMesh (UnityEngine.Mesh mesh) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:229)
Obi.ObiMeshShapeTracker.UpdateIfNeeded () (at Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs:38)
Obi.ObiColliderBase.UpdateIfNeeded () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs:189)
Obi.ObiColliderWorld.UpdateWorld () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:362)
Obi.ObiUpdater.BeginStep (System.Single stepDeltaTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:40)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:54)"


I'm using Unity 2020.2 and I everything was fine until I updated to the new Obi cloth.

Please HELP! I'm going to lost my job if I don't figure this out soon.

Print this item

Exclamación Rope Jumps attachment when old attachment is destroyed.
Posted by: Coreyjdidxon - 14-01-2021, 04:40 PM - Forum: Obi Rope - Replies (1)

Hello!

In our game we have puzzles using prefabs. When a player completes a puzzle it will randomly spawn a new one to replace it. There are 4 puzzles active at once.

Each rope puzzle has 4 ropes, phased correctly per pair so they can collide with each other.

Sometimes while testing, if i got 2 rope puzzles next to each other one wouldnt have any ropes, and the other would have double. 

If i spawn two of this rope puzzle one after another and the player completes the older prefab first, the newer ropes will snap to the old attach points. 

Video provided. https://youtu.be/x7vVf-U0tOA

Any idea on how to fix this? 

Thanks.

Print this item

  Liquid-to-Liquid Collision
Posted by: gotou - 14-01-2021, 04:31 PM - Forum: Obi Fluid - Replies (3)

I am developing a chemical experiment environment using VR.
My plan is below.
When user mixes liquid A and liquid B, after that, its mixed liquid is displayed as a percentage; 70% or more is "perfect", 40% or more is "successful", and under 39% is "Failed" respectively.
Also, if liquid A is mixed with liquid C, an explosion is happened and "Failed" is displayed.

However, I made, installed and runed the scripts, nothing happened on VR. I think the reason why I cannot get the collision between particles.
However, I am not sure how to modify the script.
If you know the solution. Could you assist me?

Reference: Obi Fluid's sample "Maze", "Obi Manual" http://obi.virtualmethodstudio.com/tutor...rials.html Assets I'm using: SteamVR Plugin, SAColliderBuilder, Obi Fluid Version of Unity: Unity 2019.4

I am looking forward to hearing your answer.

Sincerely yours,


Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using Obi;

[RequireComponent(typeof(ObiEmitter))]
public class Chemicalreaction : MonoBehaviour
{
    [System.Serializable]
    public class ScoreChangeEvent : UnityEvent<int, int> { }

    public List<ParticleCollisionEvent> collisionEvents;

    public ObiSolver solver;
    public ObiEmitter emitterA;
    public ObiEmitter emitterB;
    public ObiEmitter emitterC;
    public ObiCollider finishLine;

    public Text completionLabel;
    public Text mixLabel;
    public Text finishLabel;
    public Text Gameover;

    HashSet<int> finishedParticles = new HashSet<int>();
    HashSet<int> coloredParticles = new HashSet<int>();

    void Start()
    {
        solver.OnParticleCollision += Solver_OnParticleCollision;

        collisionEvents = new List<ParticleCollisionEvent>();
    }

    private void OnDestory()
    {
        solver.OnParticleCollision -= Solver_OnParticleCollision;

    }


    private void Solver_OnParticleCollision(ObiSolver s, Obi.ObiSolver.ObiCollisionEventArgs e)
    {
        var world = ObiColliderWorld.GetInstance();
        foreach (Oni.Contact contact in e.contacts)
        {
            ObiSolver.ParticleInActor pa = solver.particleToActor[contact.particle];
            if (contact.distance < 0.01f)
            {
                var col = world.colliderHandles[contact.other].owner;
                if (emitterB.GetComponent<ObiEmitter>() == pa.actor)
                {
                    if (coloredParticles.Add(contact.particle))
                        UpdateScore(finishedParticles.Count, coloredParticles.Count);
                }
                else if (emitterC.GetComponent<ObiEmitter>() == pa.actor)
                {
                    if (coloredParticles.Add(contact.particle))
                        Gameover.text = "Failed";
                }
                else if (finishLine == col)
                {
                    if (finishedParticles.Add(contact.particle))
                        UpdateScore(finishedParticles.Count, coloredParticles.Count);
                }
            }
        }
    }

    public void UpdateScore(int finishedParticles, int coloredParticles)
    {
        int completion = Mathf.CeilToInt(finishedParticles / 600.0f * 100);
        int mix = Mathf.CeilToInt(coloredParticles / 600.0f * 100);

        completionLabel.text = completion + "% Completed";
        mixLabel.text = mix + "% Mixed";

        if (completion > 50)
        {
            if (mix > 70)
            {
                finishLabel.text = "Perfect!";
            }
            else if (mix > 40)
            {
                finishLabel.text = "Successful";
            }
            else
            {
                finishLabel.text = "Failed";
            }
            finishLabel.gameObject.SetActive(true);
        }

    }
}

Print this item

  Doesn't work properly in 2019?
Posted by: RandomWaterbird - 14-01-2021, 10:08 AM - Forum: Obi Softbody - Replies (5)

I'm on 2019.17 and this is the default behavior for a fresh project with Obi SoftBody imported:

[Image: c6c56e1cd6aabbb44934d7a6a700e017.gif]

https://gyazo.com/c6c56e1cd6aabbb44934d7a6a700e017

Print this item

  Could not find namespace Obi
Posted by: MonaGermany - 13-01-2021, 08:55 AM - Forum: General - Replies (2)

Hello!

I have more than one Project in my Visual Studio Solution. In the first Project I can work with Obi just normally and everything works fine. But in the other Projects I can't use it. I added the references Obi.dll and ObiEditor.dll there per hand and afterwards I don't get Errors in Visual Studio any more. 
The Problem is, that Unity always shows me this Error: 
error CS0246: The type or namespace name 'Obi' could not be found (are you missing a using directive or an assembly reference?)
I really tried out different things to solve this Problem, but nothing worked so far.

Thanks in advance for your help!

Greetings
Mona

Print this item

  How to set the length of the rod
Posted by: Mingrui - 13-01-2021, 08:49 AM - Forum: Obi Rope - Replies (5)

I'd like to create a rod whose length is 0.2m. I wonder how to set the initial length of the rod, and I don't need to change it in run time.
Thank you very much.

Print this item

  Can I set the fluid material to feel like a stone
Posted by: Felix - 12-01-2021, 07:55 AM - Forum: Obi Fluid - Replies (1)

I want to change the fluid to a stone like effect while the game is running Rodar ojos If you can, please let me know. Thank you very much


(12-01-2021, 07:55 AM)费利克斯 Wrote: 我想在游戏运行时将流体更改为类似石头的效果。Rodar ojos如果可以的话,请告诉我。非常感谢你
Or how to change the physical effect of fluid to be more like the effect of stone particles

Print this item

  I want to modify ObiTearableCloth.cs and access scripts from other folders.
Posted by: k2xh0115 - 12-01-2021, 07:51 AM - Forum: Obi Cloth - Replies (1)

It is possible to create a new c# script in the same folder on ObiTearableCloth.cs to access the class. But I can't access it from the other folder I made.
I want to modify ObiTearableCloth.cs and access c# script's class in my newly created folder.
What should I do?

Thank you for answering my question last time. you're the best! Gran sonrisa

Print this item

Dedo arriba [Solved] Initialize help
Posted by: Samadhi - 08-01-2021, 11:11 PM - Forum: General - Replies (2)

Hello everyone.

I just downloaded this asset, specifically the fluids version, and started playing around with the sample scenes to get a hang of it. Now I started to use it in a new project and it seems I have problems to make it work.

In my scene I have an ObiFixedUpdater, an ObiSolver, an ObiEmitter as a child of said ObiSolver, and a blueprint attached to said ObiEmitter; so I should have everything needed to make it run.

I checked through code and it seems the solver does have the emitter in its list of actors. I also checked the "isEmitting" property of the emitter but it always returns false. I tried running the "EmitParticle" method but it returns false.

What I have noticed, though, is in the solver, it has an information box saying: "Used particles: 0". I believe the problem might be here as I checked the sample scenes and in all of the ones I checked, their solver had a number there (above the thousand). But I don't know how to create the pool of particles. Even in the sample scenes, when I try to create another solver, the new solver still remains in 0.

Any help would be appreciated. Thanks.

Print this item

  Compatible with Oculus Quest?
Posted by: taylorjames9 - 08-01-2021, 10:10 PM - Forum: Obi Fluid - Replies (13)

Are there any instructions or tips for setting up Obi Fluid so that it will show in Oculus Quest? We have been able to successfully verify that Obi Cloth and Obi Softbody work in Quest, but we have not been able to verify that Obi Fluid is visible in headset. We have downloaded and installed the Burst package and jobs system. I have put the Obi Fluid Renderer script on all cameras rendering VR. I see a tip in Frequently asked Questions that says that we need a "different camera for each eye", but I'm not sure how that's different from the two cameras that are set up in the OVR (Oculus) camera rig prefab. 

Are there any tips or instructions for getting this to work on Quest 1 or Quest 2? Any success stories? We have also set the Project Settings->Oculus -> Stereo Rendering Mode to Multipass. We certainly look forward to using this package. Thank you in advance for any help and advice.

Best, 
-James

Print this item