Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  'ObiCollider' does not contain a definition for 'idToCollider'
#1
Hi!

I just updated to ObiRope 5.5 (it was 4.1) and some structure changed and I needed to make some code adaptations. Normal process. But one error I couldn't replace. 'ObiCollider' does not contain a definition for 'idToCollider'. I opened ObiCollider.cs and indeed this propery is no longer there. On documentation it still teach to get collitions through 'idToCollider' and I can't figure it out how to make without it. I didn't see anyone here with this problem so I might be doing something wrong.

I updated from Unity Asset Store. I removed completly Obi folder and imported again from scratch.

Can anyone help me on this?

Thanks
Reply
#2
(26-08-2020, 03:57 PM)nimdanet Wrote: Hi!

I just updated to ObiRope 5.5 (it was 4.1) and some structure changed and I needed to make some code adaptations. Normal process. But one error I couldn't replace. 'ObiCollider' does not contain a definition for 'idToCollider'. I opened ObiCollider.cs and indeed this propery is no longer there. On documentation it still teach to get collitions through 'idToCollider' and I can't figure it out how to make without it. I didn't see anyone here with this problem so I might be doing something wrong.

I updated from Unity Asset Store. I removed completly Obi folder and imported again from scratch.

Can anyone help me on this?

Thanks

Hi there,

In 5.5, there's no longer any need to map from id to collider. You can directly access the collider using its index in the ObiColliderWorld singleton object. For instance, to get the collider involved in a contact:

Code:
ObiColliderWorld.GetInstance().colliderHandles[contact.other].owner

We're still updating the docs regarding this. Let me know if I can help you further.
Reply
#3
Perfect! I changed the code and looks good. I can't test it all for now because I need to recreate the rope because of this update and since Xcode 11.6 is bugged with the link I decided to postpone this game launch and wait for Xcode 12.1 with the bugfix.

But wow, thanks for the fast reply!  Corazón
Reply