I wrote a script that would match all models in one size, no matter the original size of source model. So now I have these models fit precisely in the scene, but unfortunately when I'm adding SCNPhysicsBody to them (with SCNPhysicsShape) - their colliders (shapes) are old-sized. They do not match the current scale of a node. How to fix this?
How to properly scale SCNNode so SCNPhysicsShape would be scaled for model too? It stays in old size
\$\begingroup\$
\$\endgroup\$
The problem is that SCNPhysicsShape and physics generally in SceneKit does not actually respect node scale. It would not use new size, instead it will create SCNPhysicsShape respecting the old size of node.
But you can force to use new size.
Just create physics body with nil (or null if you are using xamarin ios) in terms of shape.
E.g.:
body = SCNPhysicsBody(node, nil)
or for xamarin ios
body = SCNPhysicsBody.Create(node, null)