Hello, I got this wierd problem or bug when I try to drift or wrap my car around, the back wheels turn 90 degrees and if it goes past that it starts spinning and going out of control, I can not figure it out.
Has anyone ever encountered this or anything, I would think it is the joints problem, but Im not sure, Ill just post that code for now, please ask if you want to see something, I cant seem to get it to work.
Code:
function createRearLeftWheel ()
{
rearLeftWheel = my;
rearLeftWheel.shadow = on;
rearLeftWheel.pan += 180;
rearLeftWheel.scale_x = 1.5;
rearLeftWheel.scale_y = rearLeftWheel.scale_x;
rearLeftWheel.scale_z = rearLeftWheel.scale_x;
phent_settype (rearLeftWheel,ph_rigid,ph_sphere);
phent_setgroup (rearLeftWheel,2);
phent_setelasticity (rearLeftWheel,1,5);
phent_setfriction (rearLeftWheel,120);
phent_setmass (rearLeftWheel,130,ph_poly);
wheelConn [2] = phcon_add(ph_wheel,player,rearLeftWheel);
phcon_setparams1(wheelConn [2],rearLeftWheel.x,vector (0,0,1),vector (0,1,0));
phcon_setparams2(wheelConn [2],nullvector,nullvector,nullvector);
}
function createRearRightWheel ()
{
rearRightWheel = my;
rearRightWheel.shadow = on;
rearRightWheel.scale_x = 1.5;
rearRightWheel.scale_y = rearRightWheel.scale_x;
rearRightWheel.scale_z = rearRightWheel.scale_x;
phent_settype (rearRightWheel,ph_rigid,ph_sphere);
phent_setgroup (rearRightWheel,2);
phent_setelasticity (rearRightWheel,1,25);
phent_setfriction (rearRightWheel,80);
phent_setmass (rearRightWheel,100,ph_poly);
wheelConn [3] = phcon_add(ph_wheel,player,rearRightWheel);
phcon_setparams1(wheelConn [3],rearRightWheel.x,vector (0,0,1),vector (0,1,0));
phcon_setparams2(wheelConn [3],nullvector,nullvector,nullvector);
}