RuurdBijlsma / tm-split-speeds

TrackMania Openplanet plugin to show speed difference to your personal best at checkpoints.
https://openplanet.dev/plugin/splitspeeds
GNU General Public License v3.0
2 stars 7 forks source link

Using absolute instead of front speed #4

Closed RikuXan closed 1 year ago

RikuXan commented 1 year ago

As far as I can tell, the plugin is currently using the front speed of the car. This can lead to inconsistencies when crossing CPs in a slide angle (especially on ice), where the displayed speed is lower, but the car is actually faster absolutely and makes the comparison much harder.

The Dashboard plugin has a setting where it shows absolute speed and the calculation can be seen in this line. Basically just calculating the magnitude of the speed vector from both side and front speeds.

I think adding an option to use absolute instead of front speed would be a cool idea to improve consistency and comparability of CP speeds, especially on ice and dirt maps. However, there are obviously issues with comparability between having the setting on and off, and also I have no idea if/how this would work for the other Trackmania titles.

RuurdBijlsma commented 1 year ago

i'm not using frontspeed

RuurdBijlsma commented 1 year ago

cpSpeed = state.WorldVel.Length() * 3.6;

the length of the velocity vector is the absolute speed

RikuXan commented 1 year ago

Ah, I see I misread the preprocessor lines, thanks for clearing that up for me.

Also, massive kudos, your answer was quicker and more useful than any support for paid products I have ever received, thank you very much for your effort 🙂

RuurdBijlsma commented 1 year ago

np, I almost forgot about the maniaplanet that does use frontspeed. I think the vehiclestate wrapper in the older games doesn't feature worldspeed. I could replicate it but I don't think it's very important for those games, and not many people use my plugin in those games. It's mostly useful to have abs speed for ice and some dirt maps like you said