Latest Threads |
How to dynamically change...
Forum: Obi Rope
Last Post: josemendez
4 hours ago
» Replies: 3
» Views: 116
|
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 811
|
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 189
|
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 257
|
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 751
|
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 243
|
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 147
|
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 4,237
|
Obi 7 Model Scaling
Forum: Obi Cloth
Last Post: alkis
19-06-2025, 02:37 PM
» Replies: 2
» Views: 257
|
Obi Softbody instability?
Forum: Obi Softbody
Last Post: Aroosh
18-06-2025, 06:35 PM
» Replies: 0
» Views: 138
|
|
|
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?
|
|
|
|