Latest Threads |
How to implement/sync Obi...
Forum: Obi Rope
Last Post: josemendez
11 hours ago
» Replies: 1
» Views: 85
|
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 176
|
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 561
|
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 192
|
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 108
|
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 3,760
|
Obi 7 Model Scaling
Forum: Obi Cloth
Last Post: alkis
19-06-2025, 02:37 PM
» Replies: 2
» Views: 225
|
Obi Softbody instability?
Forum: Obi Softbody
Last Post: Aroosh
18-06-2025, 06:35 PM
» Replies: 0
» Views: 115
|
Tear Rod
Forum: Obi Rope
Last Post: chenji
18-06-2025, 08:34 AM
» Replies: 2
» Views: 206
|
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
17-06-2025, 02:07 PM
» Replies: 11
» Views: 641
|
|
|
RuntimeRopeGenerator basic questions |
Posted by: ayoci - 04-02-2025, 04:30 PM - Forum: Obi Rope
- Replies (1)
|
 |
Hi!
I had to upgrade Obi Rope from version 3 to 7 because I bought Obi SoftBody as well, and unfortunately, they don't work on separate versions.
I’m not quite familiar with this version yet.
How can I generate a ropes that always has the same length?
Currently, it generates the rope based on the distance between the Start and End points, but I don’t want that. I tried using "controlPoints.Add(Vector3.down * ropeLength);" like in the old version but it's does not work anymore.
Code: public Transform startp;
public Transform endp;
public Material material;
private ObiRope rope;
public ObiSolver solver;
public ObiRopeBlueprint ropeBlueprint;
private ObiRopeCursor cursor;
public void createropeline()
{
solver = GameObject.Find("Obi Solver").GetComponent<ObiSolver>();
GameObject ropeObject = new GameObject("ObiRope");
ropeObject.transform.SetParent(solver.transform);
rope = ropeObject.AddComponent<ObiRope>();
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
pinConstraints.Clear();
var ropeRenderer = ropeObject.AddComponent<ObiRopeLineRenderer>();
ropeRenderer.uvScale = new Vector2(1, 5);
ropeRenderer.material = material;
rope.bendConstraintsEnabled = false;
rope.stretchingScale = 0.5f;
rope.aerodynamicsEnabled = false;
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
ropeBlueprint.path.Clear();
ropeBlueprint.path.AddControlPoint(startp.position, Vector3.zero, Vector3.zero, Vector3.zero, 0.05f, 0.05f, 0.3f, filter, Color.white, "Start");
ropeBlueprint.path.AddControlPoint(endp.position, Vector3.zero, Vector3.zero, Vector3.zero, 0.05f, 0.05f, 0.3f, filter, Color.white, "End");
ropeBlueprint.path.FlushEvents();
rope.ropeBlueprint = ropeBlueprint;
AttachRopeEnds();
}
public void AttachRopeEnds()
{
if (rope == null || ropeBlueprint == null)
return;
var attachmentA = rope.gameObject.AddComponent<ObiParticleAttachment>();
attachmentA.target = startp;
attachmentA.particleGroup = ropeBlueprint.groups[0];
attachmentA.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
var attachmentB = rope.gameObject.AddComponent<ObiParticleAttachment>();
attachmentB.target = endp;
attachmentB.particleGroup = ropeBlueprint.groups[ropeBlueprint.groups.Count - 1];
attachmentB.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
}
If i switch startp.position, endp.position to Vector3.zero, Vector3.one Then nothing happens when i create the rope.
This is the script I’m currently using, and it works well, but compared to the ExtendableGrapplingHook.cs, it seems quite incomplete.
Could it cause any issues that I’m not using a Coroutine or that "var batch = new ObiPinConstraintsBatch();" section?
Or could it be that the missing parts are exactly why my rope isn't generating properly when I use Vector3.zero, Vector3.one instead of my Transforms?
I know my questions are very basic but i didn't find a normal "Runtime Rope Generator" example.
Thank you in advance.
|
|
|
static 2nd attachment causing rope to control 2nd 3D object |
Posted by: enhilljrRTI - 04-02-2025, 01:42 AM - Forum: Obi Rope
- Replies (1)
|
 |
Brief Description:
Rope attached to separate GameObjects at each end seems to be pushing around the GameObject that is attached to the far end (per the blueprint) even though the Type is set to Static in both ObiParticleAttachment components.
Detailed Description:
I'm trying to simulate a piece of flexible tubing in VR in the Meta Quest 3 that a user can grab at each end and connect to other objects. I have a 3D model of a short 1" piece of tubing that I have duplicated and positioned for use at each end. The ObiRope is created with an Extruded Renderer and contains two ObiParticleAttachment components to attach it to each of the GameObject models. The blueprint and ObiRopeExtrudedRenderer settings have been adjusted so that the rope looks very similar to the 3D tubing model. Each of the tubing model GameObjects has a BoxCollider, Rigidbody, ObiCollider, and ObiRigidbody component on it. Each GameObject also contains a child object with the scripts needed to make the object interactive in VR.
When the simulation starts, the GameObject at the starting end of the rope/tubing stays put and can be picked up and generally behaves as expected. The GameObject on the far end of the rope/tubing however immediately begins to dance around and is very difficult to grab. At all times, the rope remains attached to both GameObjects so it is being rendered properly. The problem is that ObiRope appears to be applying motion to the 2nd attachment unexpectedly.
Can someone recommend ObiRope settings that I should look into or tests I should run to try to understand why this is happening?
Any suggestions would be greatly appreciated!
|
|
|
Obi rope collider produce errors when exit Play mode |
Posted by: Apoll0 - 21-01-2025, 11:35 AM - Forum: Obi Rope
- Replies (3)
|
 |
Hello!
I am using obi rope with some colliders. I have about 8-10 ropes. They are disabled at start and are used as ropes pool. And I also have some objects with obi colliders on the scene.
A few seconds after game start I enable some ropes and move them by static particle attachments. Ropes are colliding with the objects as expected.
Everything seems working ok but when I exit play mode in Unity I get the following errors in console:
Code: InvalidOperationException: The previously scheduled job BurstColliderCollisionConstraintsBatch:CollisionConstraintsBatchJob reads from the UNKNOWN_OBJECT_TYPE CollisionConstraintsBatchJob.shapes. You must call JobHandle.Complete() on the job BurstColliderCollisionConstraintsBatch:CollisionConstraintsBatchJob, before you can deallocate the UNKNOWN_OBJECT_TYPE safely.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) <0x1dab97b60 + 0x00052> in <956eaa8539d84df5ae2a3cddf87260d0>:0
Obi.ObiNativeList`1[T].Dispose (System.Boolean disposing) (at Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs:140)
Obi.ObiNativeList`1[T].Dispose () (at Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs:148)
Obi.ObiColliderWorld.Destroy () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:201)
Obi.ObiColliderWorld.DestroyIfUnused () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:225)
Obi.ObiColliderWorld.DestroyColliderData (Obi.ObiColliderHandle handle) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:429)
Obi.ObiColliderWorld.DestroyCollider (Obi.ObiColliderHandle handle) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:333)
Obi.ObiColliderBase.RemoveCollider () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs:174)
Obi.ObiColliderBase.OnDisable () (at Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs:223)
Code: NullReferenceException: Object reference not set to an instance of an object
Obi.ObiColliderWorld.UpdateRigidbodyVelocities (Obi.ObiSolver solver) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:634)
Obi.ObiSolver.CompleteSimulation () (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1741)
Obi.ObiSolver.Teardown () (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1282)
Obi.ObiSolver.RemoveActor (Obi.ObiActor actor) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1918)
Obi.ObiActor.RemoveFromSolver () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:381)
Obi.ObiActor.OnDisable () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:343)
|
|
|
Editor Customizable Category Names |
Posted by: Jawsarn - 18-01-2025, 03:39 PM - Forum: General
- Replies (2)
|
 |
Only a few lines of code, but I think this should already be part of the asset to support an SO where you can customize the ObiCategoryNames instead of modifying the source.
|
|
|
Obi Particles stuck below ground collider |
Posted by: aderae - 16-01-2025, 11:50 AM - Forum: Obi Rope
- Replies (3)
|
 |
Hello,
I sometimes see some Obi Rope particles sometimes get stuck below the ground collider making this visible bug. I tried to play with collision settings but couldn't get my head around. How can I prevent this behaviour? I have attached 2 pictures one with mesh and one with particle rendering
Thanks!
|
|
|
Get separate particles parts |
Posted by: Zavhoz - 14-01-2025, 01:39 PM - Forum: Obi Fluid
- Replies (4)
|
 |
Hi!
How can you determine that in one emitter the particles are divided into several separate parts. And is it possible to obtain these groups of individual particles?
Regards!
|
|
|
How move selected particle in actor from script |
Posted by: Zavhoz - 13-01-2025, 08:41 AM - Forum: Obi Fluid
- Replies (3)
|
 |
Hi!
Please tell me how move selected particle in actor from script.
The general task is: after touching, i find the particle that was touched and move it with my finger. as a result, the liquid should follow the finger. All process in 2D space.
Thanks.
|
|
|
Clear singletons |
Posted by: Jawsarn - 10-01-2025, 10:27 PM - Forum: General
- Replies (1)
|
 |
It would be very neat to clear the static variables to support disabled domain reloading.
As of now from time to time it just breaks and ObiColliderWorld is null and no ropes work after you enter playmode before you do a new domain reload.
|
|
|
|