Jump to content

Vehicle settings question


Innula Zenovka
 Share

You are about to reply to a thread that has been inactive for 4587 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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.

  • Like 1
Link to comment
Share on other sites

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

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

You are about to reply to a thread that has been inactive for 4587 days.

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
 Share

×
×
  • Create New...