Page 1 of 1

Quick Start tutorial for 2d

Posted: Sat Apr 27, 2019 3:28 pm
by Scimajor
I've tried searching for an answer to this but have found no help so far.

I am trying to run through the "Quick Start" tutorial and it all works in 3d just fine. My game, however, is strictly a 2D game and I can't get past the part where the tutorial switches to "On Use" and "Mouse Position" (for select at) when I am using 2D sprites rather than 3D objects.

I've currently got all this working in my own horrible kludge of a dialog system but I wanted to migrate to this system since it is far more robust, flexible and hopefully easier to use.

What I'm seeing:
1. When I mouse over the NPC nothing happens.

What I've tried:
1. Making sure that both the NPC and the Player have 2D box colliders and rigidbody 2D's.
2. Changing the rigidbody 2D to kenematic.
3. Changing the box collider 2D to IsTrigger.
4. Changing the rigidbody 2D to gravity scale of 0.
5. Checking the collision matrix to see that everything is colliding with everything else.
6. Also selected "run raycasts in 2D".

As you can see I'm grasping at straws here.

I'm certain this is just a foolish oversight on my part but I'm stuck. It would be helpful if someone could give me a step by step guide to set up a couple of sprites with the correct colliders, rigid bodies and Dialog System components to get this working.

Please help. Thanks.

Re: Quick Start tutorial for 2d

Posted: Sat Apr 27, 2019 3:37 pm
by Tony Li
Hi,

Did you select the menu item Tools → Pixel Crushers → Common → Misc → Enable Physics2D Support...? (More info) Unity 2018+ threw a wrench into the works by making packages such as 2D physics optional. To ensure that the Dialogue System can always compile no matter what, it doesn't assume 2D physics is enabled. You need to tell it that 2D physics is enabled by using the menu item above.

Re: Quick Start tutorial for 2d

Posted: Sat Apr 27, 2019 4:15 pm
by Scimajor
Thanks. That did the trick.

Re: Quick Start tutorial for 2d

Posted: Sat Apr 27, 2019 4:34 pm
by Tony Li
Awesome! Have fun with the Dialogue System!