Hit a Major Bump In the Road. Need Help With 2D Physics Collision

Hello I am creating a 2D game that requires 2D physics collision that destroys 2D sprites which is affected by the speed and weight. Similar to Box2D games Like Crush the Castle, Kings Game and Angry Birds. Is it possible without writing 50k+ lines of code to easily replicate this in Unity?

How do I even start to tackle this from scratch?

Before I continue working on my art I need to get this mechanic out of the way.

Unity’s 2D physics is Box2D. All of the things you described are pretty vanilla in terms of capability within Unity. Have you tried the official tutorials? There is a unit on 2D physics in there that should cover all of this, and we’d be happy to help if you are confused about anything in the tutorials.

For real? It’s the same thing?!? Don’t be lying! Thank you so much. I was about to worry about this.

Also I have a question for if you are at a stand still would someone at unity step you through the process in what you’re trying to do? Is there some kind of support for that?

Box2D is integrated into Unity for 2D physics, though I can’t speak to whether the experience is exactly the same as using it outside of Unity. The data types and methods are named based on what would make sense in Unity’s workflow, but they are essentially exposure to the capabilities of Box2D.

That’s pretty much what the forums are here for. I have no affiliation with Unity Technologies, I just like game development and do my best to help people out when I can. Most of us here are something along those lines, and this is who will help you 99% of the time. There are some Unity reps with forum accounts as well, and you’ll usually see them helping out when more low-level (expert) help is needed. If you’re stuck, create a thread in the appropriate support forum, and ask for help. To get more responses, be as specific as possible, and always include code, screenshots, or videos if they are at all relevant.

If you encounter a bug with Unity, that’s where the Unity staff comes in. You can submit a bug report within the editor itself which allows you to attach a minimal example project and a description of the bug. I’ve had a bug that was messing up my whole project, but was patched within a few weeks after I submitted the report. Not saying this will always happen, but don’t be shy about submitting bug reports. They’ll even email you with the version of Unity that has the fix once it’s implemented.

Experience as in scripting? Or performance?

Thanks a bunch man.

You can use most of the advice from box2D forums on the web in Unity @MelvMay is the madman responsible for bringing it to Unity. He has done substantial work to make it easier though, so he might be the man to ask about the differences.

1 Like

As in scripting.

I can vouch for MelvMay’s helpfulness, too.

Did someone call? :wink:

@MelvMay

Sorry if I’m jumping on a post but, would the Box2D be better used lets say if I wanted to see if a sprite would fit though a gap in a wall lets say than linecast which you have to do several?

I can’t answer such a general question without more info so maybe you should start a new thread first but in the meantime, 2D physics provides a wealth of physics queries including line, ray & shape casts & shape overlaps most of which are exposes via Physics2D (see the Static Functions).