Innula Zenovka Posted October 15, 2011 Share Posted October 15, 2011 I'm trying to make a very slow moving vehicle, based on VEHICLE_TYPE_CAR, that can nevertheless negotiate bumpy ground by going over large and sudden bumps in the groud without losing a lot of speed or stalling. If it handles rough ground as well as can an avatar, I'll be very happy indeed.What parameters should I be looking at? Link to comment Share on other sites More sharing options...
Taeas Stirling Posted October 15, 2011 Share Posted October 15, 2011 Hi Innula, I can think of three things that should helpmaintain a slow steady speed on a rough surface. VEHICLE_LINEAR_MOTOR_OFFSET set the Z a little lower than zero, this forces the front end up when you hit a rough patch in the terrain. VEHICLE_FLAG_LIMIT_MOTOR_UP make sure this is set so the vehicle will not motor up into the sky when climbing a hill or bump. VEHICLE_LINEAR_MOTOR_TIMESCALE set this to a low value so that if you do get hung up a little in the rough, the motor brings you back to speed quickly, and hopefully unnoticed. 1 Link to comment Share on other sites More sharing options...
AnnMarie Otoole Posted October 18, 2011 Share Posted October 18, 2011 There is a trick you can use. I call it the accelerator. You can get the vehicle speed. You can compare this value to a desired average speed which you can set or be controlled by the passenger. If vehicle speed is less you can increase the applied force (accelerator), or if it is too high you can decrease the accelerator. This has the effect of realistically stalling temporarily on a big bump while it builds up more force until it eventually rides over. I found that the accelerator needs to back off MUCH faster than it builds up because having reached the top of the obstruction it now has a large acceleration behind it and it will take off rapidly so although increasing accelerator may be 10% each cycle, back off needs to be 80% if it is going too fast. Link to comment Share on other sites More sharing options...
Innula Zenovka Posted October 18, 2011 Author Share Posted October 18, 2011 Thanks, both. By playing with Taeas' suggestions I've been able to get it working pretty well on normally rough ground, but am having problems with small solid obstructions, such as a single step, which an avatar would negotiate with ease. AnneMarie's accelerator suggestion may well hold the answer to that. Link to comment Share on other sites More sharing options...
Void Singer Posted October 18, 2011 Share Posted October 18, 2011 shape helps too, sleds work better than boxes for instance Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now