making a vehicle go fast

unclepauly

18-09-2006 19:22:34

does anyone have any tips on how to get a vehicle to go fast? my vehicle is quite slow and i have played around with the settings to no avail.

i am using the SimpleVehicle/SimpleTyre classes. i am not using the box in demo 5, i have my own mesh of a proper car, slightly bigger than the box but not loads bigger. i thought making the car extra light would make a difference, but i have set the mass to 25.0, and also the mass of the tyres to 1.0 but still the car is slow. i have set the torque to mega-high too, but that made no difference.

what else apart from the weight of the car should i take into account?

thanks.

HexiDave

19-09-2006 01:13:59

Friction? Keep in mind that even though those tires are spinning at 40 bajillion RPM, they're slipping like crazy. Search around for creating materials and material pairs - make a pair for the tires and the ground and increase friction (don't go nuts, just make it like 1.4 or something to see how it works.)

I haven't worked with OgreNewt in a while, so I don't know the code from memory, but I had the same issue and that solved it right away.

walaber

19-09-2006 04:30:06

also remember that the Stunt Playground source code is available fro my website as well, which is a good example of Newton vehicles to look at / steal from.

unclepauly

19-09-2006 16:35:16

actually after posting this i downloaded the source for stunt playground, then had problems running it - so i posted another thread requesting help. but yes, as soon as i get it running, ill have a look at the code.

thanks too, HexiDave. But the problem at the moment is that i am extending demo 5, the simple vehicle demo. there is no function to change friction, or assign friction to a scenenode (ie tyres). the only things that i could tweak in demo 5 are the torque/steering, and of course the mass of the vehicle/tyres...As demo 5 derives from the OgreNewt::Vehicle class, i assume there are friction and other (perhaps virtual) functions available in this class that are not implemented in demo 5. if this is true, i also assume the Vehicle class is not used in stunt playground and so there must be another way to create a vehicle that allows friction tweaking etc...

maybe all will become clearer when i sneak a closer peak at the source for stunt playground.

thanks again.

[edit]
ah, looking at the Vehicle class, there are loads of extra functions (Newton api wrappers) not implemented in demo 5, so i guess demo 5 is just a starter, and i also guess using these functions to implement a gearbox/friction is up to me!

unclepauly

13-10-2006 17:06:03

thought i would continue here rather than start my 100th thread on vehicles!

so, my car is pretty much set up, speeds are in the region of 200km/h and i have stopped the crazy spazzing out etc.

but although the speed of the car is fast (i get this using m_chassis->getVelocity().length() *3.6), it looks soooo slow. if it didnt have the speedo to prove how fast the car was going, it would look like it was going about 40mph.

what can be done about this? setLinearDamping? i can change this to speed things up generally, but then the speed of the car is about 400km/h - not realistic at all.

anything else i can try?

syedhs

13-10-2006 17:38:48

I could be wrong, but 3.6 is simply a factor that you just throw in so that the perceived speed is close to actual speed. So if you think the 200km/h looks a little too slow, decrease the factor eg 2.0.

OvermindDL1

13-10-2006 18:21:46

Don't forget, if you are wanting speed, near every racing game in existance changes the fov depending on speed, so the camera tightens the faster you go, giving hte feel of greater speed. A blur wouldn't hurt either. If it is not a racing game then a couple other things to try, like the number mentioned.

walaber

13-10-2006 19:44:50

don't change the factor... the 3.6 changes m/s to Km/h. most likely the problem is the camera angle, or the scale of your game world.

syedhs

14-10-2006 08:08:19

For my case, the world scale is screwed up and therefore, the (easy) fix is to change the factor :wink: