# Custom setCollider?

**URL:** <https://forum.code.org/t/custom-setcollider/13643>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-3, csd-unit-3-lesson-18\
**Created:** [January 12, 2018, 2:26am UTC](https://forum.code.org/t/custom-setcollider/13643 "2018-01-12T02:26:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachel.krone](https://avatars.discourse-cdn.com/v4/letter/r/e36b37/32.png) [@rachel.krone](https://forum.code.org/u/rachel.krone)\
**Post date:** [January 12, 2018, 2:26am UTC](https://forum.code.org/t/custom-setcollider/13643/1 "2018-01-12T02:26:13Z")

</div>

When students use the setCollider block, they have options of a rectangle or circle. What if their sprite is flat on bottom like a rectangle and has a curvy surface at the top? Is there a way to have a custom shape so it is more realistic when they collide?

---

<div class="post-metadata">

**Author:** ![karenma](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/karenma/32/4924_2.png) [@karenma](https://forum.code.org/u/karenma)\
**Post date:** [January 12, 2018, 4:05am UTC](https://forum.code.org/t/custom-setcollider/13643/2 "2018-01-12T04:05:28Z")

</div>

The only options for setCollider is a rectangle or circle. I found this suggestion in the Game Lab Documentation for setCollider: “Often the image default rectangle collider is not appropriate for collision detection so you can set a smaller circular or rectangular collider and offset from the sprite’s center.” Hopefully messing around with the size and sprite center will help for creating more realistic collisions with different shaped sprites.

---

<div class="post-metadata">

**Author:** ![rfeitlinger](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/rfeitlinger/32/3203_2.png) [@rfeitlinger](https://forum.code.org/u/rfeitlinger)\
**Post date:** [May 30, 2018, 4:18pm UTC](https://forum.code.org/t/custom-setcollider/13643/3 "2018-05-30T16:18:19Z")

</div>

Is there a way to change the size of the Collider without changing the sprite?

---

<div class="post-metadata">

**Author:** ![jgdotson](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@jgdotson](https://forum.code.org/u/jgdotson)\
**Post date:** [February 4, 2019, 5:40pm UTC](https://forum.code.org/t/custom-setcollider/13643/4 "2019-02-04T17:40:57Z")

</div>

I know this is old but it appeared to be a common issue. You can use the [setCollider](https://docs.code.org/gamelab/setCollider/) property, click setCollider to see documentation. If you expand the tool it can essentially change the width and height of a rectangle to a specific line.

As far as an item with curvature I believe you could create multiple collision points that still move with the sprite.
