When SCNPhysicsShapeType is SCNPhysicsShapeTypeConcavePolyhedron, the bodies' friction settings are ignored (treated as if 0)
| Originator: | olidew | ||
| Number: | rdar://27148232 | Date Originated: | 2/07/2016 |
| Status: | Open | Resolved: | |
| Product: | SceneKit | Product Version: | iOS9 iOS10 |
| Classification: | Reproducible: | always |
Area: SceneKit Summary: When setting the SCNPhysicsShapeType of a body to SCNPhysicsShapeTypeConcavePolyhedron, the friction setting of the body, and of any dynamic body coming into contact with it is ignored, or treated as if it were zero. Even if you set both bodies' friction to 1, meaning neither should be able to slide against the other, the dynamic body slides over the surface of the static concave polyhedron without coming to rest, as if both bodies were made out of ice. Setting the shape type to convexHull, and the friction properties are respected. Steps to Reproduce: 1. Give a static body an SCNPhysicsShapeType of SCNPhysicsShapeTypeConcavePolyhedron. eg: groundNode.physicsBody = SCNPhysicsBody(type: .static, shape: SCNPhysicsShape(geometry: groundGeometry, options: [SCNPhysicsShapeTypeKey: SCNPhysicsShapeTypeConcavePolyhedron])) 2. Position a dynamic body above the static body, so that gravity will bring the two into contact. 3. Set the friction of both bodies to 1, meaning they shouldn't be able to slide over one another. eg: groundNode.physicsBody!.friction = 1 Expected Results: The dynamic body should drop onto the static body, and the 2 body's friction values should be respected. Eg the dynamic body might perhaps tumble (depending on the angle) rather than slide. Actual Results: Th dynamic body slides frictionlessly over the static concavePolyhedron without coming to rest, as if both had a friction value of 0. Version: iOS 9, iOS10 Notes: SCNPhysicsShapeTypeConcavePolyhedron is not a lot of use, if it can only be used to model blocks of ice Configuration: iPad Air 1, iPhone simulator
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!