The physics engine defaults with the origin centered and the walls must be defined relative to the center using the context size. I have not played around with changing the origin of the PhysicsEngine itself, but it's just going to be relative anyway to the modifiers on your surfaces.
Here is a working wall example.. just click the ball to give it some initial velocity!
Hope you can derive some help from this example!
Good Luck!
var Engine = require('famous/core/Engine');
var Surface = require('famous/core/Surface');
var EventHandler = require('famous/core/EventHandler');
var View = require('famous/core/View');
var Transform = require('famous/core/Transform');
var StateModifier = require('famous/modifiers/StateModifier');
var PhysicsEngine = require('famous/physics/PhysicsEngine');
var Body = require('famous/physics/bodies/Body');
var Circle = require('famous/physics/bodies/Circle');
var Wall = require('famous/physics/constraints/Wall');
var context = Engine.createContext();
var handler = new EventHandler();
var physicsEngine = new PhysicsEngine();
var ball = new Surface ({
size: [200,200],
properties: {
backgroundColor: 'red',
borderRadius: '100px'
}
})
ball.state = new StateModifier({origin:[0.5,0.5]});
ball.particle = new Circle({radius:100});
physicsEngine.addBody(ball.particle);
ball.on("click",function(){
ball.particle.setVelocity([1,1,0]);
});
context.add(ball.state).add(ball)
var leftWall = new Wall({normal : [1,0,0], distance : window.innerWidth/2.0, restitution : 0.5});
var rightWall = new Wall({normal : [-1,0,0], distance : window.innerWidth/2.0, restitution : 0.5});
var topWall = new Wall({normal : [0,1,0], distance : window.innerHeight/2.0, restitution : 0.5});
var bottomWall = new Wall({normal : [0,-1,0], distance : window.innerHeight/2.0, restitution : 0.5});
physicsEngine.attach( leftWall, [ball.particle]);
physicsEngine.attach( rightWall, [ball.particle]);
physicsEngine.attach( topWall, [ball.particle]);
physicsEngine.attach( bottomWall,[ball.particle]);
Engine.on('prerender', function(){
ball.state.setTransform(ball.particle.getTransform())
});