JuniorDjjr / VehFuncs

New vehicle features for GTA San Andreas mods
https://www.mixmods.com.br/2018/01/VehFuncs.html
MIT License
48 stars 4 forks source link

Gear shifter moving #10

Open JuniorDjjr opened 6 years ago

JuniorDjjr commented 6 years ago

The problem is that: There's no gear in GTA SA, It's just a looped audio. I don't know if it would be possible to create an effective gear simulation.

634R-64M35 commented 3 years ago

Yo, I have an idea as to how it could work. You see, if you download the forza speedo mod or the manual transmission mod and use the automatic version, you can see they do work with the car's gear system, they show you the true gear you're in, it's not just a guess depending on the speed. I think you can figure something out, but as for the node I have an idea, you can use maybe 'f_shift =' for the name. As for everything else, it could be something like x5y5. Esentially 'x' would be the maximum amount of distance between the node's axis in the x direction and the final point, that's a certain gear. Y would be the maximum amount of distance between the axis and the final point

gear

(Made in piskel cause why not)

As you can see, if I set x to equal 5 for instance, the object (in this instance, the gear lever) would be able to move 5 cm to either direction in the x plane. That would set where the space that goes first to second and fifth to reverse would be.

If I set y to 8 for instance, that would mean that once the lever is for example in the space between first and second, it will move 8 cm front or back (depending on the gear).

For third to fourth, it's just the x origin and the y coordinates

I hope I made myself clear

JuniorDjjr commented 3 years ago

Yes, the manual transmission mod is a "true" gear because it simulate new gears, but it is not a good mod, I'll not do this.
And Forza speedo, "it's not just a guess depending on the speed"? Are you sure? Send me the mod.

634R-64M35 commented 3 years ago

https://www.gtainside.com/en/sanandreas/mods/98245-forza-horizon-3-speedometer/

Here. As you move in the car, you'll notice how the gears move accordingly. It's not just based on speed, so if you can take a look around the code, you may be able to see how they did that

JuniorDjjr commented 3 years ago

No, it uses the fake in-game gear value, did you tested it? Doesn't follow the engine audio, it is just a value used for acceleration calculation.

634R-64M35 commented 3 years ago

Hmm, well then, it seems that this will be a bit harder then. May I suggest something? What if instead of relying on what little the game has done for gears, we make our own system. What if instead of just using the animation, we create one whole new gearing system? It's gonna be hard for sure, but it could potentially have some nice results. What I'm proposing is something like the manual transimission mod, except it's "semi-manual", that is, you move the car and it moves normally, as in the vanilla game, but if you want to go back 1 gear because you're taking a curve or need to slow down but not completely brake, you can press one button and it does that. If you're on a chase or something and need to go up one gear, you press another button and up you go, but if you don't want or have to make shifts, you don't need to, the car will "shift" automatically

I think something like this could be really beneficial for people like me, who want the adrenaline of shifting gears and whatnot, but not be tied to it, because it's kinda annoying having to change gears while a fat dude is popping vagos behind you like with the manual transmission mod. If you added this feature as something that's completely apart from the .dff model, it could technically make every car already "compatible", since it doesn't need a node or dummy.

Plus, if you do make this feature, you can then make it match the animation thing I proposed

Cheers!