16-01-2018, 09:36 AM
(15-01-2018, 08:19 PM)naoma Wrote: Hello guys, how to use it in 2d game?
I saw that all tutorials is about 3d game creation and no any tutorial about 2d game.
I tried to Add Pin Constraint but it requires Obi Collider and not Obi Collider 2d.
I used 2d Mode in rope Parameters:
Can you give me information how to pin 2d object to the rope?
Hi!
This is a typo in our code, and a very critical one by the way.
Luckily it is very easy to fix. Both ObiCollider and ObiCollider2D inherit from ObiColliderBase. So it's enough to do a couple modifications:
-In ObiPinConstraintsBatch.cs, replace all appearances of "ObiCollider" with "ObiColliderBase" (there are two, lines 16 and 46).
-In ObiPinConstraintsEditor.cs, replace all appearances of "ObiCollider" with "ObiColliderBase" (there are two, both in line 68).
that's it, pin constraints should now accept 2D colliders. This typo will be fixed in the next version. Sorry about that!