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.
|
|
|
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);
}
}
}
|
|
|
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
|
|
|
[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.
|
|
|
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
|
|
|
|