Latest Threads |
Change rod section at run...
Forum: Obi Rope
Last Post: matty337s
Today, 06:07 AM
» Replies: 0
» Views: 22
|
Sliding along a rope
Forum: Obi Rope
Last Post: vrt0r
Yesterday, 07:43 PM
» Replies: 0
» Views: 22
|
In SolidifyOnContact exsa...
Forum: Obi Fluid
Last Post: asimofu_ok
Yesterday, 04:15 PM
» Replies: 2
» Views: 49
|
Is it possible to render ...
Forum: Obi Fluid
Last Post: asimofu_ok
Yesterday, 10:07 AM
» Replies: 2
» Views: 75
|
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: Andreia Mendes
31-07-2025, 02:38 PM
» Replies: 22
» Views: 839
|
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
29-07-2025, 06:51 PM
» Replies: 6
» Views: 3,184
|
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
29-07-2025, 06:19 PM
» Replies: 4
» Views: 170
|
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 133
|
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 315
|
can you remove particles ...
Forum: Obi Softbody
Last Post: josemendez
22-07-2025, 02:19 PM
» Replies: 1
» Views: 182
|
|
|
A few questions |
Posted by: IanTc - 28-02-2018, 06:24 AM - Forum: Obi Fluid
- Replies (3)
|
 |
Hello,
We are considering a specific game's project and are looking for a 2D fluid simulator in Unity – obviously Obi Fluid seems the best ready-made solution.
Before jumping into it however, I have a few questions, I'd be glad if you could answer them:
1) The Obi solver manual states that "2D mode is usually coupled with the use of 2D colliders". Just to make sure, are you here talking about Physics2D colliders (BoxCollider2D, CircleCollider2D, etc.) as well as 2D rigidbodies? Indeed, performance will matter a lot to us, therefore using Unity's native 2D physics engine seems necessary.
2) Is solving buoyancy computational heavy? More precisely, is having a dozen of 2D rigidbodies (each with a CircleCollider2D collider) affected by buoyancy in a moving fluid, adds a lot of stress on the CPU as compared to, for instance, having just the moving fluid with the same amount of particles and same static colliders (for the 'environment' – tank, etc – containing particles)?
3) I read that emitters are either Disk, Edge, or Sphere. I guess they can be rotated in any axis so they are 3D-space emitters. So, in 2D mode, are the fluid particles computed in 3D space, even if the physics simulation is solved in XY axes only? If so, do their relative Z positions affect anything?
4) Are some simulation processes done in parallel threads or is everything computed in the main thread?
Thanks for reading, answers will definitely help!
PS: I believe that a self-executable demo of Obi Fluid, with both 2D and 3D modes, displayed framerate, interactive particle emitters, and a few objects that can be thrown and moved in the fluid with the mouse, would definitely help people to know what to expect when purchasing your product. (I know it would for us.)
|
|
|
How to add external force to particular particles? |
Posted by: dimmduh - 28-02-2018, 06:09 AM - Forum: Obi Rope
- Replies (2)
|
 |
I created custom class from ObiExternalForce, added my solver. But it does not work. Do you have any idea how to add external force to particular particles?
Code: using Obi;
using UnityEngine;
public class ObiSnakeExternalForce : ObiExternalForce
{
public float k = 100;
public override void ApplyForcesToActor(ObiActor actor)
{
var force= new Vector4(0, k, 0, 1);
force[3] = 1;//actor.UsesCustomExternalForces ? 1 : 0;
Oni.AddParticleExternalForce(actor.Solver.OniSolver, ref force, actor.particleIndices, actor.particleIndices.Length);
}
}
|
|
|
Restart rope at runtime |
Posted by: leonrdo - 27-02-2018, 08:54 PM - Forum: Obi Rope
- Replies (2)
|
 |
My question is about restart the rope simulation at runtime. I'm trying to restart the rope to its initial state (pooled particles count, path, used particles, etc.) at runtime.
Is there a method or way to restart the simulation via script?
|
|
|
Unfix cloth on runtime |
Posted by: domkonecny - 25-02-2018, 04:06 PM - Forum: Obi Cloth
- Replies (1)
|
 |
Hello, another question.
I have my cloth that has some particles fixed through unity editor -> Particle editor . But at some point in the game i need to set all of these particles as unfixed. As is possible in the editor. Or in general.. how to acess all particle parameters (and possibly change them) on runtime (mass, radius, fix/unfix, phase, etc..) ?
|
|
|
About PinConstraint Scripting |
Posted by: Cannias - 21-02-2018, 09:49 PM - Forum: Obi Rope
- Replies (4)
|
 |
Hey there!
I want to snap the ObiRope to the block i have in scene in runtime. I can snap one end of the ObiRope but the other end of ObiRope doesn't seem to be working i simply check for conditions (collider trigger, onMouseUp, etc.) and remove the PinConstraint from Spheres then add new PinConstraint to the block
As you can see in the video, white sphere (which is Pinned to the first particle) does what i want but the black one doesn't. I can't get the last particle of ObiRope. Here's my code for snapping:
Code: int addIndex; //Index of particle which i add PinConstraint (to block)
int removeIndex; //Index of particle which i remove PinConstraint (from sphere)
if (gameObject.name == "WhiteSphere")
{
//Remove the second PinConstraint & add PinConstraint to the first particle
addIndex = 0;
removeIndex = 1;
}
else
{
//Remove the first PinConstraint & add PinConstraint to the last particle
addIndex = obiRope.UsedParticles;
removeIndex = 0;
}
obiRope.PinConstraints.RemoveFromSolver(null);
ObiPinConstraintBatch batch = (ObiPinConstraintBatch)obiRope.PinConstraints.GetBatches()[0];
batch.RemoveConstraint(removeIndex);
batch.AddConstraint(addIndex, blockObiCollider, new Vector3(0.8f, 0, 0), 1);
obiRope.PinConstraints.AddToSolver(null);
Thanks in advance!
|
|
|
Position of cloth in world space |
Posted by: domkonecny - 21-02-2018, 01:04 PM - Forum: Obi Cloth
- Replies (2)
|
 |
Hello,
I am unable to get any information about position of my cloth. In my project the cloth is flying through space and is followed by camera. I started using obi and cant find the info about position anywhere. I dont need exact position. Rough estimate of cloths center would be great. Any ideas how?
|
|
|
|