# Pilot - U3L18 - Collisions

**URL:** <https://forum.code.org/t/pilot-u3l18-collisions/5910>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-3, csd-unit-3-lesson-18\
**Created:** [October 28, 2016, 1:24am UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910 "2016-10-28T01:24:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dani](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/dani/32/285_2.png) [@dani](https://forum.code.org/u/dani)\
**Post date:** [October 28, 2016, 1:24am UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/1 "2016-10-28T01:24:41Z")

</div>

Please leave any feedback, thoughts, or resources for the lesson here. As a reminder, good feedback has the following elements:

- description of your school and classroom context
- details on what went well when teaching this lesson
- details on what **didn’t** go well when teaching this lesson
- a description of the changes you would recommend to improve the lesson (including formative assessment opportunities you added to the lesson)
- details on the types of deviations you made from the lesson

For more details on what good feedback looks like, check out the [feedback guide](https://docs.google.com/document/d/1Nv7072tzl3ZaOLdE7pii3i0fXzCiYdxO4mzHrmJcw6U/edit#)!

---

<div class="post-metadata">

**Author:** ![kenneth2\_williams](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kenneth2\_williams](https://forum.code.org/u/kenneth2_williams)\
**Post date:** [February 21, 2017, 2:47pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/2 "2017-02-21T14:47:57Z")

</div>

My students have not gotten to this stage, yet, but I wanted to know about the commands mentioned in puzzle 2. My students are familiar with sprite.isTouching(), but the other two commands mentioned have not been encountered in previous levels. What are those commands used to do in GameLab?

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/josh/32/868_2.png) [@josh](https://forum.code.org/u/josh)\
**Post date:** [February 21, 2017, 7:16pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/3 "2017-02-21T19:16:35Z")

</div>

We’re working on a video to better demonstrate all of the collision methods, but basically they work as follows (assuming the two sprites are moving with velocity towards each other)  
`sprite1.bounce(sprite2)` - when they collide, sprite1 and sprite2 bounce from each other, trading velocity  
`sprite1.bounceOff(sprite2)` - when they collide, sprite1 bounces off of sprite2, but sprite2 is unaffected  
`sprite1.collide(sprite2)` - when they collide, sprite2 prevents sprite1 from moving  
`sprite1.displace(sprite2)` - when they collide, sprite1 pushes sprite2

---

<div class="post-metadata">

**Author:** ![elizabeth\_admin](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@elizabeth\_admin](https://forum.code.org/u/elizabeth_admin)\
**Post date:** [February 21, 2017, 7:31pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/4 "2017-02-21T19:31:47Z")

</div>

Hi Kenneth,

To add to what Josh mentioned about the collision blocks, I think the bulleted list in Puzzle 2 might be a little confusing. The second two bullets refer to two blocks each, but that’s not obvious at first glance. (It kind of looks like the pairs of blocks have been smushed into one block together.) We’re changing the level to give each block its own place on the list, so that should show up in a couple days, but in the meantime, the four blocks are ‘sprite.x’, ‘sprite.y’, sprite.velocityX’ and ‘sprite.velocityY’. The kids should have seen all four of those blocks in previous lessons.

If that wasn’t the source of the problem, can you tell us what the other two commands your students haven’t seen yet?

Thanks,  
Elizabeth

---

<div class="post-metadata">

**Author:** ![kenneth2\_williams](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kenneth2\_williams](https://forum.code.org/u/kenneth2_williams)\
**Post date:** [February 21, 2017, 9:01pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/5 "2017-02-21T21:01:17Z")

</div>

Below is a screen capture of Stage 14 puzzle 2. The two commands I was referring to are the ones below sprite.isTouching(). I have not seen that combination of commands in the previous levels.

 ![](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/2/24cdfd21f89ca72c118a34ce28bbf5ac8a2456d7.jpg)

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/josh/32/868_2.png) [@josh](https://forum.code.org/u/josh)\
**Post date:** [February 21, 2017, 9:25pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/6 "2017-02-21T21:25:56Z")

</div>

If you are referring to `sprite.velocityX` and `sprite.velocityY`, they were introduced in lesson 11 (there’s a video about how they work here [https://studio.code.org/s/csd3/stage/11/puzzle/2](https://studio.code.org/s/csd3/stage/11/puzzle/2) ). If that’s not it, maybe our formatting is implying that `sprite.velocityX / sprite.velocityY` and `sprite.x / sprite.y` are the commands? If that’s the case we can rewrite the instruction to make clear that we are talking about each of the four blocks (`sprite.velocityX`, `sprite.velocityY`, sprite.`x`, and `sprite.y`).

---

<div class="post-metadata">

**Author:** ![kenneth2\_williams](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kenneth2\_williams](https://forum.code.org/u/kenneth2_williams)\
**Post date:** [February 21, 2017, 9:35pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/7 "2017-02-21T21:35:26Z")

</div>

@josh I think it is the formatting issue because I initial thought that those commands were alternatives used in combination to create a collision.

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/josh/32/868_2.png) [@josh](https://forum.code.org/u/josh)\
**Post date:** [February 21, 2017, 9:36pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/8 "2017-02-21T21:36:57Z")

</div>

Cool, I’ll change the wording so that they look less like expressions.

---

<div class="post-metadata">

**Author:** ![Matt\_Rowland](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/matt_rowland/32/881_2.png) [@Matt\_Rowland](https://forum.code.org/u/Matt_Rowland)\
**Post date:** [March 1, 2017, 10:04pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/9 "2017-03-01T22:04:16Z")

</div>

My students started this lesson today and some completed it. Most students need a little more time wo get through the last puzzle. In addition I think the journaling is powerful for the students and the will need enough time to write thoughtful reflections. This lesson will wind up taking 1.5 days.

One thing I noticed: In the lesson plan it mentions that students will be practicing the action in levels 2&3. However, level 2 is the demonstration puzzle that serves as the discussion prompt prior to levels 3 & 4 which are the levels for students to implement their solutions.

Other than that one small problem, the students seemed to respond well to the lesson. The group discussion was useful and helped to reinforce the idea that there are many solutions to any programming problem. If I uncover anything else noteworthy, I’ll add to this post.

 ![](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/5/583ff2c08d66f06d9909fae7b8d3c5928707cd05.png)

---

<div class="post-metadata">

**Author:** ![gtwrobel](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/gtwrobel/32/3576_2.png) [@gtwrobel](https://forum.code.org/u/gtwrobel)\
**Post date:** [March 3, 2017, 5:45am UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/10 "2017-03-03T05:45:38Z")

</div>

Hey Matt, thanks for pointing out that inconsistency. We’ve updated the lesson plan to match the levels. Glad to hear that otherwise the lesson went well. In particular it’s exciting that the discussions and journaling are help students to synthesize what they’ve learned. Do let us know if you have more thoughts.

---

<div class="post-metadata">

**Author:** ![dani](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/dani/32/285_2.png) [@dani](https://forum.code.org/u/dani)\
**Post date:** [June 12, 2017, 5:48pm UTC](https://forum.code.org/t/pilot-u3l18-collisions/5910/11 "2017-06-12T17:48:08Z")

</div>

Closed on June 12, 2017, 5:48pm UTC


