# Car collision physics

**URL:** <https://forum.makecode.com/t/car-collision-physics/41842>\
**Category:** Help\
**Created:** [February 1, 2026, 11:53pm UTC](https://forum.makecode.com/t/car-collision-physics/41842 "2026-02-01T23:53:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![micahlikestocode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/micahlikestocode/32/33602_2.png) [@micahlikestocode](https://forum.makecode.com/u/micahlikestocode)\
**Post date:** [February 1, 2026, 11:53pm UTC](https://forum.makecode.com/t/car-collision-physics/41842/1 "2026-02-01T23:53:56Z")

</div>

So i’ve been working on this game and I can’t figure out how to make these cars collide with each other. Basically I want them to bounce off of each other depending on how fast the other car is going, for example if one car is going faster than the other and they collide, the other car bounces back farther than the faster car.

> **[2 PLAYER Soccer Cars](https://arcade.makecode.com/S62923-88498-49223-35350)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [February 2, 2026, 4:12am UTC](https://forum.makecode.com/t/car-collision-physics/41842/2 "2026-02-02T04:12:39Z")

</div>

One way is so that if 1 car overlaps the other car, the car that got hit will get the velocity of the other car but in negatives, causing it to go backwards. So basically like this:

Change (car1) vx by ((car2 vx) x -1)

---

<div class="post-metadata">

**Author:** ![micahlikestocode](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/micahlikestocode/32/33602_2.png) [@micahlikestocode](https://forum.makecode.com/u/micahlikestocode)\
**Post date:** [February 2, 2026, 6:18pm UTC](https://forum.makecode.com/t/car-collision-physics/41842/3 "2026-02-02T18:18:39Z")

</div>

So I tried doing this, and the cars just clip through each other like this.

![Screen recording 2026-02-02 12.21.56](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/2/3/23b1f6136490ec7a658527a2bc48b2b875458248.gif)

---

<div class="post-metadata">

**Author:** ![Bilangus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bilangus/32/33219_2.png) [@Bilangus](https://forum.makecode.com/u/Bilangus)\
**Post date:** [February 2, 2026, 11:42pm UTC](https://forum.makecode.com/t/car-collision-physics/41842/4 "2026-02-02T23:42:24Z")

</div>

Thats because the “move sprite” block sets your velovity each frame, so it ignores the collision setting the velocity. To fix this, make it so you loose control of the car for a brief period of time upon bumping.

---

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [February 2, 2026, 11:45pm UTC](https://forum.makecode.com/t/car-collision-physics/41842/5 "2026-02-02T23:45:19Z")

</div>

Huh, that’s strange, maybe it’s because you’re moving them with the controller? Maybe adding a forever block that says:  
if (right/left) button pressed set (car) vx to (the direction you want it to go)  
Though that might not work either 😕
