Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiRope: 2D
#2
(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.

[Image: Unity%2B2017.1.1f1%2BPersonal%2B%252864b...IZWFB73RSA]

I used 2d Mode in rope Parameters:
[Image: Unity%2B2017.1.1f1%2BPersonal%2B%252864b...IZWFB73RSA]


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!
Reply


Messages In This Thread
ObiRope: 2D - by naoma - 15-01-2018, 08:19 PM
RE: ObiRope: 2D - by josemendez - 16-01-2018, 09:36 AM
RE: ObiRope: 2D - by naoma - 16-01-2018, 10:34 AM
RE: ObiRope: 2D - by naoma - 16-01-2018, 12:03 PM
RE: ObiRope: 2D - by josemendez - 16-01-2018, 09:07 PM
RE: ObiRope: 2D - by naoma - 18-01-2018, 04:55 PM