Am making a tilt game by applying gravity on a marble which makes it move on the plan in this case the maze.
The ball have a rigidbody with mass set to 1 .The plane model have 2 parts the plane and the walls .
the plane have a metal material and smooth sphere colider unchecked .The walls have a custom material with dynamic and static friction set to 0 and both friction and bounce combine set to minimum .
the problem now is that if the marble is at a corner where it colid with 2 edges of the wall or if i manage to keep the device leveled long enough for the marble to be still it will get stuck .
Turning off and on the smooth sphere colider on the wall will unstuck the marble any idea what might be causing this ?
the code am using for moving the marble is
// Move object in XZ using accelerometer (home button at right hand)
var speed: float = 2.0f;
function Start(){
}
function Update(){
var xmovment: float = -Input.acceleration.y;
var zmovment :float = -Input.acceleration.x;
Physics.gravity= Vector3(zmovment*5,-15,xmovment*5);
}