Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
Yesterday, 05:32 AM
» Replies: 0
» Views: 68
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,767
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 185
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 436
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 688
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 777
|
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: 986
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 834
|
|
|
Disable rope inside animation event callback |
Posted by: jacob - 10-04-2022, 01:21 PM - Forum: Obi Rope
- Replies (2)
|
 |
Hi, I am trying to disable rope at runtime inside both animation event callback and statemachinebehavior, but when "ObiRope.ropeBlueprint = null" is executed, DestroyImmediate will be called inside BurstColliderWorld.cs, which is not allowed by unity, it will throw an error as follows:
Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks or OnValidate. You must use Destroy instead.
UnityEngine.Object: DestroyImmediate (UnityEngine.Object)
Obi.BurstColliderWorld: DecreaseReferenceCount () (at Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs:61)
Obi.BurstSolverImpl: Destroy () (at Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs:186)
Obi.BurstBackend: DestroySolver (Obi.ISolverImpl) (at Assets/Obi/Scripts/Common/Backends/Burst/BurstBackend.cs:21)
Obi.ObiSolver:Teardown () (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:873)
Obi.ObiSolver:RemoveActor (Obi.ObiActor) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1165)
Obi.ObiActor:RemoveFromSolver () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:362)
Obi.ObiActor:OnDisable () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:328)
I tested to change DestroyImmediate to Destroy, currently everything works fine, but I'm fully aware of it is always recommended to use Destroy over DestroyImmediate, so I'm wondering you are intentionally use DestroyImmediate to prevent some unwanted behaviors, if so, should I keep using DestroyImmediate? And what are the workarounds for this problem? (except move my code to coroutine, it has to be synchronized at exact time in order to achieve my expected behavior)
|
|
|
Does ObiStitcher has scriptable API ? |
Posted by: SimonFu - 07-04-2022, 04:40 PM - Forum: Obi Softbody
- Replies (1)
|
 |
Recently, I tried Obistitcher, which perfectly matches my need.
However, I found that ObiStitcher can only support point-wise stitching, which is rather inconvenient.
So I want to ask whether ObiStitcher has some batch-process methods or API, or something like `group` in Obi Blueprint.
Hope to hear your reply soon~
|
|
|
Obi dragger in VR |
Posted by: Darvy96 - 07-04-2022, 08:03 AM - Forum: Obi Cloth
- Replies (1)
|
 |
Hi,
I'm developing a game with Obi Cloth for VR and i have a doubt. Is it possible to grab the clothes so that the user can bring them closer and further away from himself? in other words, can it move in Unity's z-axis?
Thanks.
|
|
|
Rope created at runtime is longer than the distance between the two connection points |
Posted by: NailEngine - 05-04-2022, 10:38 PM - Forum: Obi Rope
- Replies (4)
|
 |
![[Image: img.png]](https://i.ibb.co/BTd1ZrK/img.png)
Code: const string STAND_PARTICLE_GROUP = "PointOnStand";
const string TARGET_PARTICLE_GROUP = "PointOnTarget";
int standFilter = Obi.ObiUtils.MakeFilter(Obi.ObiUtils.CollideWithEverything, 0);
int targetFilter = Obi.ObiUtils.MakeFilter(Obi.ObiUtils.CollideWithNothing, 0);
var localHit = pointOnStand.transform.InverseTransformPoint(pointOnTarget.position);
var blueprint = ScriptableObject.CreateInstance<Obi.ObiRopeBlueprint>();
blueprint.resolution = 0.5f;
blueprint.path.Clear();
blueprint.path.AddControlPoint(Vector3.zero, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, thickness, standFilter, UnityEngine.Color.white, STAND_PARTICLE_GROUP);
blueprint.path.AddControlPoint(localHit, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, thickness, targetFilter, UnityEngine.Color.white, TARGET_PARTICLE_GROUP);
blueprint.path.FlushEvents();
var generate = blueprint.Generate();
while (generate.MoveNext()) ;
var ropeGameObject = new GameObject("Rope",
typeof(Obi.ObiRope),
typeof(Obi.ObiPathSmoother),
typeof(Obi.ObiRopeChainRenderer));
ropeGameObject.transform.SetParent(solver.transform);
var ropeChainRenderer = ropeGameObject.GetComponent<Obi.ObiRopeChainRenderer>();
ropeChainRenderer.linkPrefabs.Add(chainPrefab);
ropeChainRenderer.sectionTwist = 90;
ropeChainRenderer.linkScale = Vector3.one;
var rope = ropeGameObject.GetComponent<Obi.ObiRope>();
rope.ropeBlueprint = blueprint;
if (!standEntity.ObiStandColliders.TryGetValue(pointOnStand, out var standObiColliderGO))
{
standObiColliderGO = GameObjectPool.For(m_StandObiColliderPrefab).Rent();
standObiColliderGO.transform.SetParent(pointOnStand.parent);
standObiColliderGO.transform.localScale = Vector3.one * 0.005f;
standEntity.ObiStandColliders[pointOnStand] = standObiColliderGO;
}
standObiColliderGO.transform.position = pointOnStand.position;
standObiColliderGO.transform.rotation = pointOnStand.rotation;
standObiColliderGO.transform.localScale = pointOnStand.localScale;
var standObiCollider = standObiColliderGO.GetComponent<Obi.ObiColliderBase>();
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as Obi.ObiConstraints<Obi.ObiPinConstraintsBatch>;
pinConstraints.Clear();
var batch = new Obi.ObiPinConstraintsBatch();
batch.AddConstraint(rope.solverIndices[0], standObiCollider, Vector3.zero, Quaternion.identity, 0, 0, float.PositiveInfinity);
batch.AddConstraint(
rope.solverIndices[blueprint.activeParticleCount - 1],
target.GetComponent<Obi.ObiColliderBase>(),
target.InverseTransformPoint(pointOnTarget.position),
Quaternion.identity,
0,
0,
float.PositiveInfinity);
batch.activeConstraintCount = 2;
pinConstraints.AddBatch(batch);
rope.SetConstraintsDirty(Oni.ConstraintType.Pin);
I'm basically trying to create a chain between these two objects at runtime. The length of the chain should be the distance between those two red X's which mark "mount points" to create the chain between. The circle object isn't "hanging" down because I currently have the rigidbody set to kinematic.
Any ideas?
|
|
|
Freeze softbody in certain axis |
Posted by: jaysama - 04-04-2022, 11:00 AM - Forum: Obi Softbody
- Replies (3)
|
 |
Hi Obi devs,
I want to have my softbody to fall to the ground with a fixed position, yet it moved a bit on X and Z axis.
Is there a way to freeze a softbody position in certain axis (X and Z) like in Unity's rigidbody setting?
Also how can I make all the softbodies to not interact with each other?
I figured out that I can use 1 solver for 1 softbody, but it'll bloat my scene with solvers, so is there any other way?
Thanks in advance!
|
|
|
particle like obiactor |
Posted by: maygdirf - 01-04-2022, 04:09 PM - Forum: Obi Cloth
- Replies (5)
|
 |
Hi again!
I was wondering if it's possible to treat each particle of a ObiCloth like a ObiActor, so move them in a desired position for example. In particular, I would like doing a suturing task like the medical procedure in which the two parts of a wound have to enlace using a rope. Thanks in advice.
|
|
|
|