# Chapter 6. Dice falling through the plane

**URL:** <https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222>\
**Category:** ARKit by Tutorials\
**Created:** [February 27, 2019, 5:55am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222 "2019-02-27T05:55:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergeydi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sergeydi/32/81494_2.png) [@sergeydi](https://forums.kodeco.com/u/sergeydi)\
**Post date:** [February 27, 2019, 5:55am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/1 "2019-02-27T05:55:40Z")

</div>

Hi,

After implementing Plane physics in Chapter 6, very often dice falling through the plane or several dice falling through the plane and several stayed on the plane.

It also happens in final tutorial project .

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [February 27, 2019, 1:57pm UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/2 "2019-02-27T13:57:04Z")

</div>

@chrislanguage Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![sergeydi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sergeydi/32/81494_2.png) [@sergeydi](https://forums.kodeco.com/u/sergeydi)\
**Post date:** [March 3, 2019, 7:45am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/3 "2019-03-03T07:45:13Z")

</div>

Issue can be fixed using of [continuousCollisionDetectionThreshold](https://developer.apple.com/documentation/scenekit/scnphysicsbody/3013743-continuouscollisiondetectionthre):

> For example, in a game involving projectiles and targets, a small projectile may pass through a target if it moves farther than the target’s thickness within one time step. By setting the projectile’s continuousCollisionDetectionThreshold to match its diameter, you ensure that SceneKit always detects collisions between the projectile and other objects.

```
func throwDiceNode(transform: SCNMatrix4, offset: SCNVector3) {
   ...

   if #available(iOS 12.0, *) {
      diceNode.physicsBody?.continuousCollisionDetectionThreshold = 0.04
   }
        
   sceneView.scene.rootNode.addChildNode(diceNode)
}

```

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 3, 2019, 5:54pm UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/4 "2019-03-03T17:54:43Z")

</div>

@sergeydi Thank you for sharing your solution - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![sergeydi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sergeydi/32/81494_2.png) [@sergeydi](https://forums.kodeco.com/u/sergeydi)\
**Post date:** [March 7, 2019, 6:52am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/5 "2019-03-07T06:52:35Z")

</div>

My solution is incorrect. It can be used only with spherical physics shapes.

So, issue is still unsolved…

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 12, 2019, 12:21am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/6 "2019-03-12T00:21:16Z")

</div>

@sergeydi Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![zoran](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/zoran/32/102075_2.png) [@zoran](https://forums.kodeco.com/u/zoran)\
**Post date:** [July 9, 2019, 8:05am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/7 "2019-07-09T08:05:10Z")

</div>

Hi, I still have issues with his. Redid numerous times and still fall through

---

<div class="post-metadata">

**Author:** ![zoran](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/zoran/32/102075_2.png) [@zoran](https://forums.kodeco.com/u/zoran)\
**Post date:** [July 9, 2019, 8:59am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/8 "2019-07-09T08:59:26Z")

</div>

Ok, closed Xcode, delete app of iPad… had a snack to compose myself. Restarted and rebuilt now dice no longer fall through… no idea why but at least it works now.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 9, 2019, 9:36am UTC](https://forums.kodeco.com/t/chapter-6-dice-falling-through-the-plane/63222/9 "2019-07-09T09:36:55Z")

</div>

@zoran Really glad you sorted it out! Cheers! :]
