Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 03/20/23 17:51
Strange error messages in for-loops
by AndrewAMD. 03/20/23 16:21
How can convert mdl7 with UV's?
by l1ve10. 03/20/23 16:13
Asset list - Market Column
by MatPed. 03/20/23 08:44
working with Futures
by logomon. 03/18/23 23:21
AUM Magazine
Latest Screens
SHADOW (2014)
Tactics of World War I
Hecknex World
Who's Online Now
6 registered members (logomon, AndrewAMD, YesNotes, paulk, titanicpiano14, l1ve10), 1,392 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
YesNotes, DonQuijote, cokibor, stilrz, unatrader
18906 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
car.c how to add a trailer or wagon? #486237
07/01/22 13:35
07/01/22 13:35
Joined: Nov 2008
Posts: 42
Ice2642 Offline OP
Ice2642  Offline OP

Joined: Nov 2008
Posts: 42

Has anyone there already added a wagon or trailer in the car.c template for him to drag with physics and wheels?
Or know how do this?

Like the image.

[Linked Image]

I Appreciate any help.

Thank you in advance.

A8 PRO 8.47.1
Re: car.c how to add a trailer or wagon? [Re: Ice2642] #487237
02/16/23 10:10
02/16/23 10:10
Joined: Jun 2008
Posts: 19
VoroneTZ Offline
VoroneTZ  Offline

Joined: Jun 2008
Posts: 19
I check this with "pXcon_setwheel" example from gamestudio manual, works fine

//create trailer at 370 quants behind the player
ENTITY* car2 = ent_create("truck.mdl",vector(player.x-370,player.y,player.z),NULL);

 // add 2 wheels at 43 quants from center of trailer
ENTITY* tBLwheel = ent_create("buggy_rad1.mdl",vector(car2.x,car2.y+43,car2.z+13),NULL); 
ENTITY* tBRwheel = ent_create("buggy_rad1.mdl",vector(car2.x,car2.y-43,car2.z+13),NULL); 

 //add physx to trailer

 //connect trailer to player
pXcon_add ( PH_BALL, player, car2, 1 );

//connect wheels to trailer
pXcon_add ( PH_WHEEL, tBLwheel, car2, 0 ); 
pXcon_add ( PH_WHEEL, tBRwheel, car2, 0 );

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

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

Powered by UBB.threads™ PHP Forum Software 7.7.1