Quick Start tutorial for 2d

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Scimajor
Posts: 4
Joined: Sat Apr 27, 2019 3:10 pm

Quick Start tutorial for 2d

Post 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.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quick Start tutorial for 2d

Post 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.
Scimajor
Posts: 4
Joined: Sat Apr 27, 2019 3:10 pm

Re: Quick Start tutorial for 2d

Post by Scimajor »

Thanks. That did the trick.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quick Start tutorial for 2d

Post by Tony Li »

Awesome! Have fun with the Dialogue System!
Post Reply