size of terrain changes general speed..?

unclepauly

18-10-2006 22:17:12

hi,

my car looks like it is sliding on ice a little bit as it is driving in a striaght line, making it move from side to side, albeit a litle bit, but quite noticable.

using the isAirBorne function, i found out that at some point, all 4 wheels were coming off the floor just a little bit (obviously not all at the same time :wink: ), and this was causing the slipping-on-ice effect (if one wheel is off the ground i guess this causes weight transfer to the other side of the car..?)

what i also noticed was that if i scale my terrain SMALLER, this increases the effect a whole lot more - the wheels come off the ground alot more frequently, causing the ice-effect more frequently. the LARGER i made my terrain, the less frequent the problem.

more testing, and the SMALLER the terrain, the FASTER the car 'looks' to the human eye. the LARGER the terrain, the slower the car 'looks' to the human eye. i have written 'looks' in inverted commas becasue although the car may look fast/slower, the actual speed of the car in km/h (as returned from getVelocity.length * 3.6) is always constant.

i deduced that the reason the wheels are going air-borne is because the car is going too fast, and is too light. but, the 'actual' speed of the car (getVelocity) is not the problem because it remains constant regardless of the size of the terrain, it is how fast the car 'appears' to be travelling across the terrain (like i say,it goes faster the smaller the terrain). in addition, i have made the car super-heavy and the probem remains, so this suggests that the car is not too light.

so i guess my first question is, why does the car 'look' like it is travelling faster/slower depending on the size of the terrain? and is there a fix for this?

HexiDave

18-10-2006 23:33:56

Well you're just talking about relative scale - if the terrain is 5000 units and your car is 3-4 units long, lets say you're using meters, then your terrain is 5km long and your car is 3-4m long, so it looks like a long distance. Now if the terrain is 50 units long, then the car is relatively larger, so it covers the distance at the same speed, but relatively faster since the terrain is smaller than the 5km version.

unclepauly

18-10-2006 23:43:14

right, that makes sense...

so like you say, the actual speed stays the same regardless of the terrain. what happens then, is that the car 'appears' faster or slower, due to the reason you have just given.

so this leads to my actual question, why does the car become more airborne (well, the wheels) the smaller the terrain, and why does this problem stop the larger i make the terrain?

the wheels becoming air borne suggests the car is flipping because it is too light, or going too fast. well, i am not changing the weight. and you have just said the car is not is not going any faster or slower, it just looks like it is.

does this make sense?

HexiDave

19-10-2006 00:01:20

Well how is your terrain setup? Is it really flat or really bumpy? Check the debug view to see if the terrain is correctly matching. If it's really bumpy, then making it smaller means the wheels are probably going all over the place from the bumps.

Try adjusting the suspension on the wheels if it's "springing" off the ground.

unclepauly

19-10-2006 00:36:39

my terrain is completely flat. it is exported from freeworld3d - when you start a new project, you are given a plane, and then you play around with it, dig holes, make hills etc. i simply exported the plane. no bumps, no hills or anything.

my suspension settings, and in fact most of the car settings (mass etc) are stolen from walbers stunt playground (if they're good enough for him... :wink: )


Ogre::Real susShock = 160;
Ogre::Real susSpring = 700.0;
Ogre::Real susLength = 0.2;


again, these should not make a difference if the terrain is flat.

this is what i can see hapenning:
1 - the larger the terrian, the slower the car appears to travel across it. the slower the car appears to travel, the less it flips.
2 - the smaller the terrain, the faster the car appears to travel across it. the faster the car appears to travel, the more it flips.
3 - all the time, regardless of the size of the terrain or how fast the car appears to be going, the car maintians the same speed, calculated by m_chassis->getVelocity() (fyi, it reaches about 130km/h after a couple of secs, and stays there).

so, i deduce from this that the speed of the car that the newton world thinks it is doing is not the same as m_chassis->getVelocity(). it looks like somehow newton sees the speed of the car as it appears on the screen (ie its position on the screen), and so this is why the slower the car appears on the screen, the less likely it is to flip. the faster it appears to be going, thne more likely it is to flip. it seems to me that m_chassis->getVelocity is not acurate in calculating the speed at all.

anyway thats the end of my thesis :wink: