Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  ObiRope Points
#11
(19-10-2021, 12:02 PM)josemendez Wrote: Yes, those are the pooled (inactive) particles. Quoting myself:


A certain amount of extra particles are preallocated when you create a rope blueprint. These are collectively referred to as the particle "pool", and start out inactive (invisible, and not used in the simulation). If you do not plan on resizing or cutting the rope at runtime, you can set the blueprint's pool size to zero. No inactive particles will be added to the rope.

The reason for preallocating particles and activating/deactivating them instead of just creating/destroying particles at runtime is -as with most pooling strategies in Unity- to avoid runtime allocation and minimize garbage collection. See:
http://obi.virtualmethodstudio.com/manua...setup.html


Assuming you do have a non-empty pool, if you want to only get the active particles you should do:
Code:
for (int i = 0; i < actor.activeParticleCount; ++i)
{
Debug.Log(solver.positions[actor.solverIndices[i]]);
}


In fact, is my object Obi Rope the same actor? The index of the actor is the same Obi Rope as the index in the hierarchy ??

PhoneRope1 this is essentially actors[0]
PhoneRope2 this is essentially actors[1]???? Thanks

.png   ropes.PNG (Size: 4.14 KB / Downloads: 21)
Reply


Messages In This Thread
ObiRope Points - by Matbee - 19-10-2021, 10:26 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 10:50 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:24 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 11:27 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:00 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 11:24 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:28 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 11:29 AM
RE: ObiRope Points - by Matbee - 19-10-2021, 11:47 AM
RE: ObiRope Points - by josemendez - 19-10-2021, 12:02 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 01:26 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 01:30 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 02:36 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 02:50 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 02:52 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 03:02 PM
RE: ObiRope Points - by Matbee - 19-10-2021, 04:23 PM
RE: ObiRope Points - by josemendez - 19-10-2021, 04:36 PM
RE: ObiRope Points - by Matbee - 20-10-2021, 09:23 AM
RE: ObiRope Points - by josemendez - 20-10-2021, 09:53 AM
RE: ObiRope Points - by Matbee - 20-10-2021, 02:12 PM
RE: ObiRope Points - by josemendez - 20-10-2021, 02:30 PM
RE: ObiRope Points - by Matbee - 20-10-2021, 04:06 PM
RE: ObiRope Points - by josemendez - 20-10-2021, 05:41 PM
RE: ObiRope Points - by Matbee - 21-10-2021, 10:14 PM
RE: ObiRope Points - by josemendez - 21-10-2021, 10:26 PM
RE: ObiRope Points - by Matbee - 21-10-2021, 10:42 PM
RE: ObiRope Points - by josemendez - 22-10-2021, 07:18 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 07:56 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:04 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 08:20 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:30 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 08:41 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:46 AM
RE: ObiRope Points - by Matbee - 22-10-2021, 12:40 PM
RE: ObiRope Points - by josemendez - 25-10-2021, 08:44 AM
RE: ObiRope Points - by josemendez - 22-10-2021, 08:46 AM