Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi rope collision stops working after loading scene
#2
(22-12-2022, 12:53 AM)Zombie1111 Wrote: Hi, this is what I do...
I have a rope in Scene A.
Then I put that rope in DontDestroyOnLoad.
Then I load scene B.

After I have done that the rope does not collide with any obi collider in scene B! Opening the ropes path editor and changing something then closing it fixes the issue.

Hi!

I'm unable to reproduce this, loading a new scene while keeping ropes from the old one seems to work well for me. How are you doing this exactly, can you share your code?

(22-12-2022, 12:53 AM)Zombie1111 Wrote: Enabling and disabling the rope also fixes the issue but sometimes completely breaks the rope so it aint reliable at all. 

Disabling/enabling a rope should work fine, disabling simply takes the rope out of the solver and then re-adds it back when you enable it. Could you elaborate on how this "breaks" the rope?

(22-12-2022, 12:53 AM)Zombie1111 Wrote: So I guess there is a function that I need to call after the scene has finished loading to like update all obi colliders. But I dont know what the function is called.
I have tried [solver].updateBackend

Not really, when an ObiCollider is instantiated it is automatically accounted for, no need to call any function. solver.UpdateBackend basically removes all actors from the current solver, tears the backend down, reinitializes it and then re-adds all actors back. Similar to disabling all actors, checking if the backend has been modified, and then re-enabling them.

kind regards,
Reply


Messages In This Thread
RE: Obi rope collision stops working after loading scene - by josemendez - 22-12-2022, 12:02 PM