Posted By: Sorrowful
Car Physics - 06/22/12 12:38
Code:
VECTOR araba_git; ENTITY* tekeronsol; ENTITY* tekeronsag; ENTITY* tekerarkasol; ENTITY* tekerarkasag; action tekeronsl() { tekeronsol = me; pXcon_setparams1(me,araba_git, NULL, NULL); } action tekeronsg() { tekeronsag = me; pXcon_setparams1(me,araba_git, NULL, NULL); } action tekerarkasl() { tekerarkasol = me; pXcon_setparams2(me,araba_git, NULL, NULL); } action tekerarkasg() { tekerarkasag = me; pXcon_setparams2(me,araba_git, NULL, NULL); } action araba_ac() { player = me; pXent_settype(me,PH_RIGID,PH_BOX); pXcon_add(PH_WHEEL,tekerarkasag,my,0); pXcon_add(PH_WHEEL,tekerarkasol,my,0); pXcon_add(PH_WHEEL,tekeronsag,my,0); pXcon_add(PH_WHEEL,tekeronsol,my,0); while(1) { pXcon_setwheel(tekeronsol,-5,0,0); pXcon_setwheel(tekeronsag,-5,0,0); pXcon_setwheel(tekerarkasol,0,500,0); pXcon_setwheel(tekerarkasag,0,500,0); pXent_move(me,araba_git,nullvector); araba_git.x = (key_w-key_s)*40*time_step; araba_git.y = (key_a-key_d)*20*time_step; camera.x = me.x; camera.y = me.y - 300; camera.z = 650; camera.tilt = -10; wait(1); } } function main() { physX_open(); video_mode = 9; video_screen = 1; level_load("BasGaza.wmb"); }
car is moving only,wheels do not move and is not mounted on wheels...