Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Di Mai 28, 2024 20:45

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 11 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: NewtonVehicle Demo
BeitragVerfasst: Fr Jan 14, 2005 21:00 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
I can't work out how to make the newton demo act more real. Aka real vehicles have faster acceleration and speed. also when u reverse you don't wait for ages until it slows down, it nearly instantly stops then reverses.

Iv looked at the C demo that comes with Newton SDK(which acts realisticaly) and can't seem to find anything in it that would make the NewtonVehicle demo act more real. Increasing traction seem to make the wheels revolve faster but they don't seem to have any grip, so thats all it seems to do. Increasing the mass makes it go slower and decreasing u get very wierd physics results.

Anyone know how to make the Vehicle in the NewtonVehicle demo go faster? (i.e so that it could jump from one ramp to another..... not drive off the end at 0.000001 mph)

- Newton Vehicle

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 17, 2005 17:54 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Aug 28, 2002 19:27
Beiträge: 568
Wohnort: Chemnitz / Sachsen
change the value of newtonupdate to a higher value .... this should always help.

_________________
Aktuelles Projekt :
www.PicPlace.de


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 17, 2005 21:19 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Shouldn't have to speed up the entire world just to make a car go faster......

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 17, 2005 23:51 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Aug 28, 2002 19:27
Beiträge: 568
Wohnort: Chemnitz / Sachsen
then adjust the force/torque attented to the car ...

_________________
Aktuelles Projekt :
www.PicPlace.de


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 18, 2005 02:29 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
To make the car go any distance with Torq u need it to be around 25000 and the wheels spin like mad.

the only thing that i can find that has anything to do with force is here:

Code:
  1.  
  2. procedure PhysicsApplyGravityForce(const Body : PNewtonBody); cdecl;
  3. var
  4.  mass  : Single;
  5.  Ixx   : Single;
  6.  Iyy   : Single;
  7.  Izz   : Single;
  8.  Force : TVector3f;
  9. begin
  10. NewtonBodyGetMassMatrix(Body, @mass, @Ixx, @Iyy, @Izz);
  11. Force := V3(0, Mass * -19.8, 0);
  12. NewtonBodySetForce(Body, @Force);
  13. end;
  14.  


and thats just so it has gravity.

Iv played with basicaly every value, nothing seems to give any good results.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 18, 2005 10:16 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Aug 28, 2002 19:27
Beiträge: 568
Wohnort: Chemnitz / Sachsen
now i tried it myself

if you set the torque in the procedure
Code:
  1. procedure TNewtonVehicle.ProcessInput;
  2. var
  3.  Keys : array[0..255] of Boolean;
  4.  i    : Integer;
  5. begin
  6. // Update keystates
  7. for i := 0 to High(Keys) do
  8.  Keys[i] := (Hi(GetAsyncKeyState(i)) = 128);
  9. // Check keys
  10. if Keys[vk_Left] then
  11.  Vehicle.SetSteeringAngle( 30 * PI/180);
  12. if Keys[vk_Right] then
  13.  Vehicle.SetSteeringAngle(-30 * PI/180);
  14. if Keys[vk_Up] then
  15.  Vehicle.SetTorque(5000); // THIS VALUE !!!!!!!!!!!!
  16. if Keys[vk_Down] then
  17.  Vehicle.SetTorque(-250);
  18. if Keys[vk_Space] then
  19.  Vehicle.SetBrake(1);
  20. // Reset car's steering and torque if no key is pressed
  21. if (not Keys[vk_Left]) and (not Keys[vk_Right]) then
  22.  SetSteeringAngle(0);
  23. if (not Keys[vk_Up]) and (not Keys[vk_Down]) then
  24.  SetTorque(0);
  25. end;

but dont turn it into an to high value, i tried it with 2500 and 5000. i think 10000 is also possible but 25000 ???? well this looks tooo much ....

_________________
Aktuelles Projekt :
www.PicPlace.de


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 18, 2005 19:18 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
5000 causes alot of spin, and isn't much different to 2500.

Tires never grip.

Attached is a Demo Engine im working on.(easyer to see the difference with torq's) The only way i found to increase speed (a bit) was to change the friction of the MatVehicle to 2.

Keys:
Arrow keys - Movement
Enter/Return - Flip
Space - Brake

Extract Both Zips to a directory (it came to 288kb when it was all in one... evil forum size limit). Newton dll 1.3 isn't included.

Note: the boxes at the end of one jump don't work... the collision areas for them fall through the floor taking one of the boxes with them... but not the rest...
Note2: when the wheels spin they look like there going back and forward at the same time (if u turn on the show collisions from the menu), and when there not spinning they look like there going one way.


Dateianhänge:
GlobalUnits.zip [123.99 KiB]
277-mal heruntergeladen
DND.zip [164.92 KiB]
277-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 18, 2005 19:48 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
Use NewtonVehicleSetTireMaxLongitudinalSlideSpeed to change the point at when the tires loose grip and do a burn-out. The fact that there is no high friction in that demo is because that value is low (or set to default) which means that the wheels start to slip at low speed and when wheels are slipping (like in a burn-out) the don't have any grip and therefore it seems like low grip.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 18, 2005 23:39 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
yeh i found that in the C++ one and added it. So in theory if the torq was increased gradualy insted of being a set value, it would work properly? If so how can i get the value of the current torq(i havn't seen a function to get the current torq)?

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jan 19, 2005 12:44 
Offline
DGL Member
Benutzeravatar

Registriert: Mo Sep 23, 2002 19:27
Beiträge: 5812
Programmiersprache: C++
You don't need to know the torque, since there is no such property for a wheel (you put torque on a wheel which causes a force). What you need is the angular velocity also known as omega which can be retrieved by NewtonVehicleGetTireOmega.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Jan 19, 2005 18:49 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
So to work out how much torque u need to apply to the wheel would u do

Code:
  1.  
  2. speed := 1*MultiSize * Omega;
  3.  


Where 1*MuliSize is the radius of the wheel. And then add the Speed + say 50 to the wheel as torque?

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 11 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 6 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.025s | 16 Queries | GZIP : On ]