Unity – Custom 2D Colliders [Scripts]

Updated on January 30, 2018 in Resources
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
22 on January 20, 2016

I’ve made some some custom 2D colliders and wanted to share them with you guys.
Demo/Preview
Source Code

There are a total of 6 colliders:

  • Bezier Curve Collider 2D
  • Arc Collider 2D
  • Ellipse Collider 2D
  • Rounded Box Collider 2D
  • Capsule Collider 2D
  • Star Collider 2D

Let me know if you find them useful and have any questions.

  • Liked by
  • amarghd
  • James Ball
  • HunGARE
  • GuyQuad
  • Job
Reply
2 on January 20, 2016

How exactly do you make em?

Helpful
on January 20, 2016

Change section to resources so it’s easier to find?

Wise
on January 20, 2016

How exactly do you make em? From Ash123456

I’m using EdgeCollider2D.
Calculations are done in the script to make the edge collider look like any particular shape that I want.

Show more replies
  • Liked by
Reply
Cancel
2 on January 20, 2016

These are really awesome GuyQuad! I really love all of them, especially the star. I don’t know if they already exist on it, but have you considered putting these on the Unity Assets store? Even if you sell them only for a dollar you could make a fair amount of money. Well done!

Wise
on January 20, 2016

I’m glad you like them. I have never uploaded to the Asset Store until now. Maybe i’ll give it a try. Are they good enough to be on the store? Did you encounter any bugs?

Devoted
on January 20, 2016

I have not used it but other members of the forum have. Maybe ask them, and don’t worry, they are more than good enough to me 🙂

Show more replies
  • Liked by
Reply
Cancel
4 on January 20, 2016

I love these! They are all really well made and look like they were coded really well! If you are going to be posting this on the Unity Asset Store and need help with the graphics for the store page or the logo etc for it, email me and I might be able to help 🙂

Great work, once again!

Wise
on January 20, 2016

Thanks James and that sound’s great. I want to add maybe 1 or 2 more colliders and once I’m done with that I’ll email you. 🙂  

Wise
on January 20, 2016

Awesome! What colliders do you think you’ll be adding next? They’re really interesting!

Wise
on January 21, 2016

Currently I’m modifying the existing colliders with some extra features.

  • Rounded Box can now be transformed into a trapezoid
  • Capsule Collider can now be transformed into a bullet and vice versa
  • Ellipse collider can be transformed into an oval/egg shape [wip]

If you have any ideas/requests. Feel free to let me know and I’ll implement them

Wise
on January 21, 2016

That will be very useful! I think that bullet idea will be extremely useful for making a 2D shooter, as the collider is so much more presise as it’s all programed instead of being mesh etc.

I’m trying to think of some others you could do, but I can’t think of any at the moment. I’ll comment again if I have a good idea!

Show more replies
  • Liked by
Reply
Cancel
1 on January 20, 2016

This is looking really good!
It’s that I don’t use 2D colliders ever, but if I did I’d make sure having these colliders in all my projects!

Wise
on January 21, 2016

Haha thanks. Do you use raycasting instead of colliders?

Show more replies
  • Liked by
Reply
Cancel
1 on January 20, 2016

These are really well made! Adding them to my bookmarks for future use. Thanks!

Wise
on January 21, 2016

Sounds great. I would love to see how you use them.

Show more replies
  • Liked by
Reply
Cancel
1 on January 20, 2016

Pretty Awesome!

Wise
on January 21, 2016

Thanks a lot!

Show more replies
  • Liked by
Reply
Cancel
2 on January 26, 2016

Really nice work man!
I don’t do 2d games,but if I would..I would get in touch with these that you’ve uploaded (y).

I could learn something from your works 🙂

Wise
on January 26, 2016

Thanks man.

While making these scripts, I learnt quite a lot about bezier curves/splines. They can be super useful for creating procedural meshes or implemeting dynamic camera movement in a 3d game.

Keep learning. Cheers 🙂

on January 26, 2016

absolutely,especially for the dynamic camera ^.^
I think it can be really handy if you train on this ,can save you time and make it really precise camera movement and it can wonders out of a game,or a cartoon movie or some cinematics 😀 .
Cheers

Show more replies
  • Liked by
Reply
Cancel
0 on January 26, 2016

Awesome I might eventually use but not at this moment 😀

  • Liked by
Reply
Cancel
0 on January 30, 2018

Amazing work!

Can I use these for commercial use and give you credit? Thanks!

  • Liked by
Reply
Cancel