Page 1 of 1

Engine Acceleration Question

Posted: Tue Dec 19, 2017 4:28 pm
by Swaffy
ObjectTemplate.setMinRotation -1/0/-1
ObjectTemplate.setMaxRotation 1/0/1
ObjectTemplate.setMaxSpeed 4/0/10
ObjectTemplate.setAcceleration 4/0/10

I have a question regarding tank's engine acceleration code. Is there a way to set it to accelerate very slowly but decelerate very fast? Currently, it is the same speed so it accelerates very slow and also decelerates very slow. The tank will stop quickly (due to brakes) but the wheels keep spinning.

Re: Engine Acceleration Question

Posted: Fri Dec 22, 2017 9:02 pm
by takiwa
I don't think it can be done, swaffy. It seems the player input is defined by 1 number, not 2...i.e., both acceleration and deceleration are controlled by the setting that defines user input...either when the button is pressed, or released.

Re: Engine Acceleration Question

Posted: Mon Dec 25, 2017 1:00 am
by Swaffy
I am talking about engine performance, not player input.

Re: Engine Acceleration Question

Posted: Thu Dec 28, 2017 2:19 am
by takiwa
Yes, I know. Your question was, "Is there a way to set it to accelerate very slowly but decelerate very fast?" My answer was, "It seems the player input is defined by 1 number, not 2...i.e., both acceleration and deceleration are controlled by the setting that defines user input".

You are looking for 2 numbers, one that defines acceleration, and one that defines deceleration. Unfortunately, there is only one number, and it defines both. At least, as far as I know. I have been trying to get the tanks to traverse slower for years, but the traverse is linked to accel/decel speeds, so I can't seperate the actions. Limit of the engine I suppose

Re: Engine Acceleration Question

Posted: Thu Dec 28, 2017 3:44 am
by Swaffy
takiwa wrote:You are looking for 2 numbers, one that defines acceleration, and one that defines deceleration. Unfortunately, there is only one number, and it defines both. At least, as far as I know. I have been trying to get the tanks to traverse slower for years, but the traverse is linked to accel/decel speeds, so I can't seperate the actions. Limit of the engine I suppose
I understand what you said now, thanks. I was affraid of this and yea... wish the engine code was a little more in-depth. Oh well.

I set one of my tanks to have a high top speed but a very slow acceleration. But to get the tank up hills I couldn't set the Torque too slow so I reduced its engine rotation acceleration. I have the effect I want when accelerating but when the driver hits the brakes the tanks stops fast and the wheels continue spinning ... really sucks. I'm sure it's possible in a newer engine like BF2.