01-04-2023, 05:10 PM
(This post was last modified: 01-04-2023, 05:18 PM by josemendez.)
(01-04-2023, 04:18 PM)exWitcher Wrote: Hi, I have 2 game objects that are connected to each other with a rope and they have a parent object. Due to the mechanics of my game, I use this object by pulling it from the pool and sending it back to the pool. When I pull an object from the pool to use it a second time, the obi rope position comes at a completely different point and I can never fix it in runtime. Is there a restart function for ropes or solvers? I dont want to Instantiate new objects in runtime..
I can add videos or gifs if needed. But i could use an urgent help
Hi!
Actors in Obi (this includes ropes, rods, and basically any object made out of particles) do not have a position/orientation of their own, their transform values are only used for spawning the blueprint once the actor is created. The reason for this is that you can’t determine the placement of a deformable object using a single position/orientation.
At runtime, each particle in the actor has its own position and orientation in the solver’s local space. So if you let the simulation run for a while they may end up far away from the objects’s transform.
If you want to reset all particles in an actor to the position/orientation they had when the actor was created (that is, the ones stored in the actor’s blueprint) you can use actor.ResetParticles().
Kind regards,