Engine Acceleration Question

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Engine Acceleration Question

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: Engine Acceleration Question

Post 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.
Image
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Engine Acceleration Question

Post by Swaffy »

I am talking about engine performance, not player input.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: Engine Acceleration Question

Post 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
Image
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Engine Acceleration Question

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply