So I've designed a hallway that I want my player to walk through, but I can 't seem to get a physics body to work for it. Either the player walks through the walls or he can't walk down the hallway because it sees the object as a giant cube. How do I get the physics body to go around the object.
let chessPieces = SCNScene(named: "art.scnassets/hallway.dae")
if let knight2 = chessPieces?.rootNode.childNodeWithName("Room", recursively: true) {
knight2.position = SCNVector3Make(150, 30, 0)
knight2.scale = SCNVector3Make(knight2.scale.x * 200, knight2.scale.y * 200, knight2.scale.z * 200)
var nodeScale = NSValue(SCNVector3:SCNVector3Make(200, 200, 200));
var nodeGeometry = knight2.geometry;
var shape = SCNPhysicsShape(geometry: nodeGeometry!, options: [SCNPhysicsShapeScaleKey:nodeScale])
knight2.physicsBody = SCNPhysicsBody(type:SCNPhysicsBodyType.Static, shape: shape)
knight2.physicsBody?.categoryBitMask = rockCategory
knight2.physicsBody?.angularVelocityFactor = SCNVector3Make(0.0,0.0,0.0)
knight2.physicsBody?.collisionBitMask = 3
knight2.name = "Student"
knight2.physicsBody?.mass = 1000
scene?.rootNode.addChildNode(knight2)
}