WiggleWizard / quake3-movement-unity3d

A port of the Quake III strafe jumping mechanics to Unity3D
285 stars 71 forks source link

How can I disable CPM movement? #17

Closed jkatz01 closed 1 year ago

jkatz01 commented 5 years ago

Pretty basic question but I would appreciate it if you tell me how to turn off CPM style air control, thanks!

WiggleWizard commented 5 years ago

You can't right now, it's hardcoded into the script. You'll have to revert the CPMA style to VQ3 manually by porting the VQ3 code yourself. Sorry!

Razzeeyy commented 5 years ago

Actually you can try disabling CPM style air control by trying to tweak a few variables.

Look at this piece of code for reference: https://github.com/WiggleWizard/quake3-movement-unity3d/blob/858675d65657b0e8ef36dca87099d1c9c3a6f081/CPMPlayer.cs#L222-L239

You'd need to set airControl to 0 (this is mainly the variable that gives that CPMA side-to-side strafe acceleration feel). And then if you set sideStrafeAcceleration to the value that's equal to airAcceleration that should effectively disable the CPMA movement.

And maybe tweaking sideStrafeSpeed would do something too, like setting it to higher value if you wish. Although no certainty about last one.

Try experimenting with these suggestions @TheDominusCaseus see if it works out.