Engine Acceleration Question

Ask questions, discuss ideas, get answers

Engine Acceleration Question

Postby Swaffy » Tue Dec 19, 2017 4:28 pm

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

Re: Engine Acceleration Question

Postby takiwa » Fri Dec 22, 2017 9:02 pm

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
takiwa
 
Posts: 72
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: Engine Acceleration Question

Postby Swaffy » Mon Dec 25, 2017 1:00 am

I am talking about engine performance, not player input.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Image
User avatar
Swaffy
 
Posts: 1677
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Engine Acceleration Question

Postby takiwa » Thu Dec 28, 2017 2:19 am

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
takiwa
 
Posts: 72
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: Engine Acceleration Question

Postby Swaffy » Thu Dec 28, 2017 3:44 am

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


Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Google [Bot] and 6 guests