Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi 7.0 ParticleAPI
#5
(09-06-2025, 04:33 PM)alicecatalano Wrote: and the output is always the same position for all the particles with both methods.
Any other suggestion??

Hi!

The only situation in which the content of renderablePositions and positions arrays will differ is when your ObiSolver component has interpolation/extrapolation enabled, and no physics update has taken place in the current frame. As explained in the manual:

Quote:If the solver's interpolation mode is set to interpolate or extrapolate, solver.renderablePositions and solver.renderableOrientations will contain temporally smoothed-out data that won´t coincide with the physical particle positions/orientations at the end of the simulation step. That's why they are called "renderable": they are only used for smooth rendering, but they aren't fed back into the simulation.

This behavior is the same as Unity's transform.position (which is the GameObject equivalent to renderablePosition) and rigidbody.position (which is the GameObject equivalent to Obi's position).

Now, if the position returned is the same for all particles, that either means you're calling this code from the wrong place, or there's some other issue causing this. Would help us to know the context in which this code is being used.

kind regards,
Reply


Messages In This Thread
Obi 7.0 ParticleAPI - by PlatonSk - 29-08-2024, 11:37 AM
RE: Obi 7.0 ParticleAPI - by goosejordan - 29-08-2024, 12:01 PM
RE: Obi 7.0 ParticleAPI - by josemendez - 29-08-2024, 12:02 PM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 09-06-2025, 04:33 PM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 06:23 AM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 10-06-2025, 08:31 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 08:47 AM
RE: Obi 7.0 ParticleAPI - by chenji - 10-06-2025, 09:40 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 10:16 AM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 10-06-2025, 10:18 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 10:26 AM
RE: Obi 7.0 ParticleAPI - by alicecatalano - Yesterday, 09:19 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 10:21 AM