Latest Threads |
Change rod section at run...
Forum: Obi Rope
Last Post: matty337s
7 hours ago
» Replies: 0
» Views: 12
|
Sliding along a rope
Forum: Obi Rope
Last Post: vrt0r
Yesterday, 07:43 PM
» Replies: 0
» Views: 16
|
In SolidifyOnContact exsa...
Forum: Obi Fluid
Last Post: asimofu_ok
Yesterday, 04:15 PM
» Replies: 2
» Views: 33
|
Is it possible to render ...
Forum: Obi Fluid
Last Post: asimofu_ok
Yesterday, 10:07 AM
» Replies: 2
» Views: 57
|
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: Andreia Mendes
31-07-2025, 02:38 PM
» Replies: 22
» Views: 813
|
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
29-07-2025, 06:51 PM
» Replies: 6
» Views: 3,176
|
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
29-07-2025, 06:19 PM
» Replies: 4
» Views: 161
|
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 127
|
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 305
|
can you remove particles ...
Forum: Obi Softbody
Last Post: josemendez
22-07-2025, 02:19 PM
» Replies: 1
» Views: 179
|
|
|
Indexing Particles while using Obi Rope Cursor |
Posted by: MisterToot - 17-06-2024, 10:20 AM - Forum: Obi Rope
- Replies (2)
|
 |
Once a cursor is added to a rope (and the length is altered) it looks like the index of the particles no longer returns in a nice order using the below method:
Code: // first particle in the rope is the first particle of the first element:
int firstParticle = rope.elements[0].particle1;
// last particle in the rope is the second particle of the last element:
int lastParticle = rope.elements[rope.elements.Count-1].particle2;
// now get their positions (expressed in solver space):
var firstPos = rope.solver.positions[firstParticle];
var lastPos = rope.solver.positions[lastParticle];
Instead, I have found I'll get the index of the first particle correct, and the last particle index will be at the first cursor spawn position, and then after that, I can't spy an order to the particles.
I'm using two cursors both facing inward in case that context matters, though I've found the same issue with just one cursor in the crane demo scene also.
Any clues/advice from folks for how to get a nice ordered index of them?
|
|
|
Cave diving and cave crawing simulator in VR |
Posted by: goosejordan - 17-06-2024, 07:37 AM - Forum: Made with Obi
- Replies (2)
|
 |
Hello!
I've been working on a caving simulator for some time now. Obi has become an integral part to get rope climbing, guidelines and hoses interactive! It's incredible what it can do :O
I'm seeing some performance issues from the high fidelity of the rope, but hopefully the new GPU accelerated version can improve on that!
|
|
|
System.ObjectDisposedException: The UNKNOWN_OBJECT_TYPE has been deallocated |
Posted by: bugbeeb - 15-06-2024, 01:25 AM - Forum: Obi Rope
- Replies (2)
|
 |
Seeing this exception when debugging in visual studio,
System.ObjectDisposedException: The UNKNOWN_OBJECT_TYPE has been deallocated, it is not allowed to access it
at (wrapper managed-to-native) Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow_Injected(Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle&)
at Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) [0x00000] in <0652bf0e14024522b5c92574ad0ef550>:0
at Obi.ObiNativeList`1[T].Dispose (System.Boolean disposing) [0x0003d] in C:\Users\bugbe\SpinnyWheels\Assets\Obi\Scripts\Common\DataStructures\NativeList\ObiNativeList.cs:110
at Obi.ObiNativeList`1[T].Finalize () [0x00002] in C:\Users\bugbe\SpinnyWheels\Assets\Obi\Scripts\Common\DataStructures\NativeList\ObiNativeList.cs:90
Unity version 2022.3.30
Obi Rope Version 6.5.4
|
|
|
Cloth curtain |
Posted by: balaji.v - 13-06-2024, 01:38 PM - Forum: Obi Cloth
- Replies (2)
|
 |
Hi,
How can we implement a obi cloth curtain that can expand and shrink using controller drag in Quest?
Thanks.
|
|
|
Efficiently determine actor under ray |
Posted by: 4ringz - 12-06-2024, 11:47 PM - Forum: General
- Replies (2)
|
 |
Hi,
I'd appreciate some quick advice re: whether there's a more performant way to accomplish what I'm trying to do OOTB. For a first-person "grabbing" system I need to get the particle and related Actor (specifically softbody, but right now code works w/ all actors) closest to an origin point with a given ray.
My current code (adapted crudely from the particle picker example scripts) works, but as it's iterating through A) all particle positions and then B) an undetermined number of softbodies and each of their particles again to relate the particle to an Actor, it's quite inefficient, as I may need many softbodies as well as non-softbody particles in my scenes.
If there are cached bounds/extents per Obi actor I could cluster them into volumes, cast the ray through volumes, and then only iterate over each of their particles, but if those structures exist in ObiActor I can't seem to locate them.
Appreciate any help, thanks!
Code: public ObiActor GetActor(ObiSolver solver, int particleIndex){
foreach (ObiActor actor in solver.actors){
for (int i = 0; i < actor.solverIndices.count; i++){
if (actor.solverIndices[i] == particleIndex){
return actor;
}
}
}
return null;
}
public int Raycast(ObiSolver solver, Ray ray, float radiusScale, float maxDistance, Vector3 origin){
if (solver == null) return 1;
int hitParticle = -1;
float closestMu = float.MaxValue;
float closestDistance = float.MaxValue;
Matrix4x4 solver2World = solver.transform.localToWorldMatrix;
// Find the closest particle hit by the ray
for (int i = 0; i < solver.positions.count; ++i){
Vector3 worldPos = solver2World.MultiplyPoint3x4(solver.positions[i]);
if (Vector3.Distance(worldPos, origin) > maxDistance) continue;
float mu;
Vector3 projected = ObiUtils.ProjectPointLine(ray.origin, ray.origin + ray.direction, worldPos, out mu, false);
float distanceToRay = Vector3.SqrMagnitude(worldPos - projected);
// Disregard particles behind the camera:
mu = Mathf.Max(0, mu);
float radius = solver.principalRadii[i][0] * radiusScale;
if (distanceToRay <= radius * radius && distanceToRay < closestDistance && mu < closestMu){
closestMu = mu;
closestDistance = distanceToRay;
hitParticle = i;
}
}
return hitParticle;
|
|
|
Towel simulation in Quest |
Posted by: balaji.v - 12-06-2024, 07:31 AM - Forum: Obi Cloth
- Replies (13)
|
 |
Hi,
I am working on a VR project where I need to grab a towel using a controller and then fold and unfold it, as well as rub the cloth on other objects with collision.
Could you please suggest possible ways to achieve the above simulation?
Thanks.
|
|
|
|