Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by NeoDumont. 02/17/26 15:40
Hedge on FXCM, 4 or 5?
by Martin_HH. 02/16/26 16:09
Zorro version 3.0 prerelease!
by jcl. 02/12/26 14:05
MarginCost discrepancy?
by jcl. 02/12/26 14:02
CMC MT4 CFD vs FX Active - what's better?
by mayarik. 02/11/26 11:00
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 9,409 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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