Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
car #230077
10/02/08 17:11
10/02/08 17:11
Joined: Jul 2008
Posts: 17
1
12thhellion Offline OP
Newbie
12thhellion  Offline OP
Newbie
1

Joined: Jul 2008
Posts: 17

var wheelcon;

function cam{
camera.x = my.x + fcos(my.pan,-200);
camera.y = my.y + fsin(my.pan,-200);
camera.z = my.z + 50;
camera.pan = my.pan;
}

function initchassis{
phent_settype(my,ph_rigid,ph_box);
ph_setgravity(vector(0,0,-300));
phent_setmass(my,100,ph_box);
phent_setgroup(my,2);
phent_setfriction(my,20);
phent_setelasticity(my,20,20);
phent_setdamping(my,0,0);
}

function initwheel{
while(player == null){wait(1);}
phent_settype(my,ph_rigid,ph_sphere);
phent_setmass(my,1,ph_sphere);
phent_setgroup(my,2);
phent_setfriction(my,20);
phent_setelasticity(my,0,20);
phent_setdamping(my,30,30);
wheelcon = phcon_add(ph_wheel,player,my);
phcon_setparams1(wheelcon,my.x,vector(0,0,0),vector(0,0,0));
phcon_setparams2(wheelcon,vector(0,0,0),nullvector,nullvector);

}



action wheel{

initwheel();

while(1){

wait(1);
}

}




action user{
player = my;
initchassis();
while(1){

cam();
wait(1);
}
}

function main{
video_switch(7,0,1);
level_load("tester.wmb");
}


I finally got the physics engine working, but every attempt at making the car accelerate has failed, can anyone tell me how to do it?

Re: car [Re: 12thhellion] #255875
03/13/09 07:23
03/13/09 07:23
Joined: Jan 2009
Posts: 11
KuRdisTaN - IraQ
dlOvanO Offline
Newbie
dlOvanO  Offline
Newbie

Joined: Jan 2009
Posts: 11
KuRdisTaN - IraQ
may this help you

.......... Physics


....Never Say I don't Say I'll try....

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1