I have created a simple object an place it in SceneKit scene, on top of it I release another object that collide with the first object.All work fine..
But, when I scale my first node up the collision don't work anymore...
Any reason why?
Any suggestion how to fix this?
func loadStreet(){
let street = loadAssetWithName(nameFile: "street", nameNode: "street", type: "usdz", scale: SCNVector3(1,1,1))
street.position = SCNVector3(0, 0.5, 0)
street.eulerAngles = SCNVector3(0, deg2rad(220), 0)
let body = SCNPhysicsBody.static()
body.physicsShape = SCNPhysicsShape(node: street)
body.categoryBitMask = BodyType.floor.rawValue //2 int, assegnato solo a quel oggetto
body.collisionBitMask = BodyType.car.rawValue | BodyType.box.rawValue //1 con cosa puo collidere
body.allowsResting = false
body.restitution = 1
body.friction = 0.5
body.rollingFriction = 0
street.physicsBody = body
street.name = "street"
self.scene.rootNode.addChildNode(street)
}