Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (henrybane), 1,246 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | chip programmers | 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