Newton uses an upvector-joint to fix the tilt, roll of the player,
but i cannot find a way to do this in 3dgS/ODE until now...

tried this with PH_BALL and a dummy, but the dummy doesn't move -.-
Code:
phent_settype (my, PH_RIGID, PH_BOX);	
phent_setmass (my, 1, PH_BOX);
phent_setfriction (my, 50);
phent_setdamping (my, 50, 100);
phent_setelasticity (my, 30, 30);
	
	
ENTITY* upvector = ent_create(NULL, vector(my.x, my.y, my.z + 100), 0);
set(upvector, PASSABLE);

var jointID = phcon_add(PH_BALL, me, upvector);
phcon_setparams1(jointID, nullvector, nullvector, nullvector);
phcon_setparams1(jointID, nullvector, nullvector, nullvector);

while (1)
{
	vec_set(upvector.x, my.x);
	upvector.z += 100;0;
...


Last edited by kasimir; 12/25/08 08:55.