Hi!

I think you are trying to create something similar to Labyrinth game on mobile devices (you won't be able to see the rolling of the table on the video, cause iphone is actually the table grin ). I've made one pretty long time ago, and I didn't roll the table at all! Think about it in a different way! Don't roll the table, but change camera angles instead! For the end user is doesn't really matter since it looks like table is rolling and ball is moving correctly.

Edit: I finally found this old thread (it's from 2011) grin

Edit2: as an example, try this demo (to understand what I've meant):
Code:
void main(){
	fps_max = 60;
	
	level_load("");
	wait(3);
	
	ENTITY* planeEnt = ent_create(CUBE_MDL, nullvector, NULL);
	vec_set(planeEnt.scale_x, vector(10, 10, 0.5));
	wait(1);
	c_setminmax(planeEnt);

	var i = 0;
	
	ENTITY* testEnt[4];
	
	for(i = 0; i < 4; i++){
		testEnt[i] = ent_create(CUBE_MDL, nullvector, NULL);
		vec_set(testEnt[i].scale_x, vector(10, 1, 1));
		wait(1);
		c_setminmax(testEnt[i]);
	}
	
	vec_set(testEnt[0].x, vector(0, planeEnt.max_y - testEnt[0].max_y, testEnt[0].max_z - (testEnt[0].min_z / 2)));
	vec_set(testEnt[1].x, vector(0, planeEnt.min_y + testEnt[1].max_y, testEnt[1].max_z - (testEnt[1].min_z / 2)));
	vec_set(testEnt[2].x, vector(planeEnt.max_x - testEnt[2].max_y, 0, testEnt[2].max_z - (testEnt[2].min_z / 2)));
	vec_set(testEnt[3].x, vector(planeEnt.min_x + testEnt[3].max_y, 0, testEnt[3].max_z - (testEnt[3].min_z / 2)));
	
	testEnt[2].pan += 90;
	testEnt[3].pan += 90;
	
	var cam_pan = 0, cam_tilt = -90;
	
	camera.arc = 90;
	
	while(1){

		cam_pan -= 0.05 * mickey.x;
		cam_pan = clamp(cam_pan, -5, 5);

		cam_tilt -= 0.05 * mickey.y;
		cam_tilt = clamp(cam_tilt, -95, -85);
		
		vec_set(camera.pan, vector(0, cam_tilt, 0));
		ang_rotate(camera.pan, vector(cam_pan, 0, 0));
		
		vec_set(camera.x, vector(-(cam_tilt + 90) * 2, -(cam_pan) * 2, 150));
		
		wait(1);
	}
}



Greets

Last edited by 3run; 05/05/15 09:42. Reason: added code

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung