|
|
Re: [newton]about accleration
[Re: HackerL]
#97026
11/02/06 20:24
11/02/06 20:24
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
Quote:
it is an tip?
Quoted HackerL. I can't interpret that. In Newton, if you use the right script functions that are included for 'Newton cars', and setup 'input' values correctly, acceleration and deacceleration should be handled by Newton nearly automatically. If you press the forward key the car should gradually approach top speed and then remain there while the forward key is pressed. If you release the forward key, the car's speed should gradually decrease.
If you setup everything correctly or if just use the 'default setup', the car shouldn't just immediately stop when no key is pressed.
You probably don't want to set my.carEngineTorque = -0.3 when the forward key isn't pressed because the car will probably eventually start going backwards when the user isn't pressing a key. Essentially, if you just reset my.carEngineTorque to 0, and no key is pressed the car should probably just gradually slow down. For the most part, you probably don't need to 'muck' with acceleration directly.
C-Script is not C++.
|
|
|
|
|
|