Re: [xmoto-dev] change of engine speed counter algorithm |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/xmoto-dev Archives
]
Dnia Wed, 2 May 2007, nadenislamarre@xxxxxxx naskrobal
>hum, it's not realistic because on a bike, the counter indicates the
>engine
>counter, not the move counter. It's why i did it how it was. I'll see
>what it
>looks like tomorrow.
Ok. I thought that when couter dial unit is km/h this is bike move
speed, imo engine counter schould be rather in rpm.
> Hum,
> you changed my function float PlayerBiker::getBikeEngineSpeed()
> which really compute getBikeEngineSpeed(), you should create a new one for your
> computing.
Ok, I'll revert it in a while. My algorithm will be in
getBikeLinearVel(). In my next commit both values will be shown on
couter, just give me about half an hour ;)
> /* protection against invalid values */
> if (speed > 400)
> return 0;
>
I've created this becuse during first frame prevRearWheelPos and
prevFrontWheelPos have undefined values and returned speed gets very
big.