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
0 registered members (), 18,435 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
Page 2 of 2 1 2
Re: A6 car question [Re: Marco_Grubert] #48836
07/26/05 02:34
07/26/05 02:34
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Thanks, Marco

I have another question. Sorry to trouble you.

1. Please explain me this line :
if(abs(angRL)>abs(angRR)) {angSpeed=-angRL;} else {angSpeed=angRR;}

In my multiplayer car, if i do this line, my car is not going faster and braking.

And i changed it to this
if (abs(angRL)>abs(angRR)) { angSpeed=angRL;} else {angSpeed=angRR;}
and it is working but key_down is acting same as key_brake.

Why did you put sign(-) before angspeed of rear left wheel ?

2. Please tell me tips about making car's handbraking ?
If you make handbraking when car speed is very high, car will stop changing orientation /I don't know how to call it/. In your tutorial car doesnot change
it's orientation, it will just stop.




The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: A6 car question [Re: Olzii] #48837
07/26/05 02:43
07/26/05 02:43
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Here is my multiplayer A6 car : exe


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: A6 car question [Re: Olzii] #48838
07/26/05 23:21
07/26/05 23:21
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Quote:

1. Please explain me this line :
if(abs(angRL)>abs(angRR)) {angSpeed=-angRL;} else {angSpeed=angRR;}



This is a hack that's not quite as good as it could be.
What that function does is it tries to find the cars current speed (angular speed of its rear wheels). Since one of the wheels might be stuck in a corner with the other one spinning the if clause picks the larger velocity of the two wheels. For the sample car the wheels were mounted with the hubcaps facing outwards. This means that the right rear wheel will spin forward, but the left wheel is 180 degrees rotated with respect to the left wheel. Because of that rotation it returns it's forward speed as a negative value. That's why the angular velocity of the rear left wheel (angRL) is negated.
If your wheels are symmetrical you can just duplicate them without rotation and remove the minus sign in that line above.

Quote:

If you make handbraking when car speed is very high, car will stop changing orientation /I don't know how to call it/. In your tutorial car doesnot change it's orientation, it will just stop.


I think you are saying that your car spins to the left or right when you pull the handbrake. This comes from tiny differences in friction between the wheels. It can be solved by applying less braking torque or by applying the torque smoothly over time. If you look at the top of the file you should see the constant definition for braking torque which is about 50% of maximum torque delivered by the drivetrain if I remember correctly. To summarize: make your brakes less effective so that the wheels won't lock and the car won't spin.

Re: A6 car question [Re: Marco_Grubert] #48839
07/27/05 01:05
07/27/05 01:05
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
I want that my car must spin to left or right when car has high speed and i push handbrake. In other games like GTA and NFS, it does so.

I decreased brake torque down, it has same effect. Brake torque was affecting only in speed, but car did not spin.


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

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