Global Variable

SCNPhysicsShapeScaleKey

An option for selecting the scale factor of the shape relative to the local coordinate space of the node containing it.

Declaration

const SCNPhysicsShapeOption SCNPhysicsShapeScaleKey;

Discussion

The value for this key is an NSValue object containing an SCNVector3 structure, whose components describe the scale factor in each of the x-, y- and z-axis directions. The default value is the vector {1.0, 1.0, 1.0}, specifying no change of scale.

SceneKit’s physics simulation ignores the scale property of nodes containing physics bodies when simulating collisions. Instead, use this option to provide a scale factor when creating custom physics shapes. (If you create a physics body for a node without specifying a custom shape, SceneKit uses the node’s scale property to infer this scale factor at creation time.)