I have a rope prefab with 2 particle attachments which reference child transforms with fixed joints on them.
I also have an Attach(transform) function which moves these particle attachment positions, and fills the fixedjoint connected body.
This all works fine on the prefab if it's already in the scene when I press Play, and then call Attach(), but if I instantiate (ropeprefab), set it's transform parent to the solver and call Attach() in the same frame, it seems the particle attachments will go to the correct position, while the rope appears to remain as if the attachments never moved. If I move the attached transforms afterwards, the rope will move relative to them properly (but with a permanent offset).
Not sure what's going on here or how to fix it.
EDIT: RESOLVED by pooling some ropes
I also have an Attach(transform) function which moves these particle attachment positions, and fills the fixedjoint connected body.
This all works fine on the prefab if it's already in the scene when I press Play, and then call Attach(), but if I instantiate (ropeprefab), set it's transform parent to the solver and call Attach() in the same frame, it seems the particle attachments will go to the correct position, while the rope appears to remain as if the attachments never moved. If I move the attached transforms afterwards, the rope will move relative to them properly (but with a permanent offset).
Not sure what's going on here or how to fix it.
EDIT: RESOLVED by pooling some ropes