03-04-2023, 07:12 AM
(This post was last modified: 03-04-2023, 07:12 AM by josemendez.)
(01-04-2023, 06:34 PM)exWitcher Wrote: Hey, thanks for the answer
I have tried rope.ResetParticles() before I post here but didn't work for me
I called that function after I've pulled the object from pool (like it should be?) . I can see the blueprint line is correct and my ropes attached transforms are correct but it looks like it has different object to attached and acting its own. I have no idea whats happening
(The second object from the pool actually the first one)
How have you implemented "pulling object from the pool"? Is it just enabling/disabling GameObjects?
What's happening here is that particles are simulated in the solver's local space, not the rope's local space. So when you instantiate a rope, its particles appear in the position they had relative to the solver object when they were "alive" for the last time. This is explained in the docs:
http://obi.virtualmethodstudio.com/manua...olver.html
Quote:Solvers always perform the simulation in local space. This means that translating, rotating or scaling the solver will rigidly transform the simulation as a whole.
You just need to move the particles back to the position they're supposed to be in when you take the object out of the pool. ResetParticles() should do the job, as long as it's called at the right moment. If I could take a look at your pooling code would make it easier to tell what's wrong.
kind regards,