|
|
Why does setting InverseMass to zero on a single particle freeze all particles? |
Posted by: pushmatrix - 07-04-2021, 12:58 AM - Forum: Obi Fluid
- Replies (7)
|
|
Hi there,
I'm trying to completely freeze some particles while making others still simulate. I adapted the script from (http://obi.virtualmethodstudio.com/tutor...icles.html) to target certain particles and stop them completely by setting their inverse mass to zero.
But what I'm finding is that any particles that come into contact with ones with inverse mass to zero come to a complete stop as well.
This even happens if I only set the invMass to zero on a single particle:
Code: actor.solver.invMasses[0] = 0;
I'm guessing if a particle touches a particle with infinite mass, something bugs out and causes everything to stop?
Here's a gif of one emitter shooting a stream onto currently frozen particles. As soon as the stream touches those frozen ones, they all freeze. Hmm. I would have expected the red stream to just collide ontop.
https://gfycat.com/tarttartcockatoo
Thanks for any insight!
|
|
|
Get position of particle at end of rope |
Posted by: cfinger - 07-04-2021, 12:41 AM - Forum: Obi Rope
- Replies (3)
|
|
Hello,
I would like to find the position of the particle at one end of a rope, no matter how much it has been resized at runtime.
I have a rope with two control points and two particle attachments. The top attachment is static and the bottom is dynamic. I'm looking to reset an object to the end of the rope (on the dynamic attachment), and to do this I want to either move the rope to the object, or the object to the rope. They are both within close proximity of each other.
I tried to get the solver index of that particle using the rope's blueprint:
Code: int solverIndex = defaultRopeBlueprint.groups[1].particleIndices[0];
Vector3 worldPos = rope.GetParticlePosition(solverIndex);
This seemed to work, but if I change the length of the rope at runtime, I get a position that doesn't make sense.
I also tried the solution from this thread, which needed a bit of updating. I'm not sure if I'm doing this correctly. I am getting a solver index of 0 for both the first and last particle.
Code: ObiConstraintsBatch batch = (ObiConstraintsBatch)rope.GetConstraintsByType(Oni.ConstraintType.Distance).GetBatch(0);
int lastParticle = batch.particleIndices[(batch.constraintCount - 1) * 2 + 1];
int firstParticle = batch.particleIndices[0];
Vector3 worldPos = rope.GetParticlePosition(firstParticle);
//or
Vector3 worldPos = rope.GetParticlePosition(lastParticle);
Thank you!
|
|
|
Question before buying about the length of the rope. |
Posted by: iamlis - 07-04-2021, 12:32 AM - Forum: Obi Rope
- Replies (1)
|
|
Hello.
I am looking for a fan implementation for Unity that will allow the following:
unwind the rope for a great length and go around many obstacles with it, and then unwind it, pulling the object at the end of the rope to its beginning.
In this regard, I would like to clarify in order to understand whether the Obi Rope implementation is suitable for me:
- how long can a rope be made without losing productivity?
- what are the benchmarks (from the performance evaluations on the site I could not understand this), how to pull, how long the rope in a meter of Unity can be created?
- if there are video clips with tests of the maximum length, I will also be grateful.
Thanks in advance for your reply.
|
|
|
Softbody generation of proceduraly generated objects? |
Posted by: look001 - 06-04-2021, 03:50 PM - Forum: Obi Softbody
- Replies (1)
|
|
Hey there,
is it possible to generate a softbody from a procedural generated mesh? I have a game where the player creates a mesh and then turns it in a softbody all at runtime. It's no problem if there is a lag of 10 seconds for generating the particles and skinning the mesh. Thank you for your attention.
|
|
|
Change a softbody scale /make different solvers interact together? |
Posted by: imbalex0 - 02-04-2021, 11:14 PM - Forum: Obi Softbody
- Replies (2)
|
|
So basically, I'm making a multiplayer game where my players are softbody and they need to be able to change size mostly at will. Since I need them to interact with each other, they are all in the same solver so I can't simply change the solver scale. (Unless there is somehow a way to make different solvers interact together and I didn't know about it, if so pls explain). I have a feeling that what I'm asking is impossible and I have some alternative solutions in case it is, but I have some hope. Thank for any help you can provide
|
|
|
Add Particles To Start, Remove From End |
Posted by: darthmerth - 01-04-2021, 09:05 PM - Forum: Obi Rope
- Replies (1)
|
|
Is it possible to add new particles to one end and remove from the other side at the same time? Like the rope is being sent from one side and received from the other ?
I tried manipulating Cursor Mu and direction in many ways without success. Adding works perfectly, like in the Crane sample but removing "eats from one side" and only in one direction, even though I change the direction. I'm trying to make it look like someone is pulling and getting the rope from that end. Of course both ends are attached, so I'm using values like 0.02 or 0.98 instead of 0 and 1 in cursor mu.
Thanks in advance!
|
|
|
|