Hey. I’m having some problems with a shooting script in unity, mainly for pistols. Since getbuttondown doesn’t work with FixedUpdate, I have to use it in Update. My problem comes in with recoil. Since Update updates every frame, the framerate you are getting greatly impacts the recoil the gun has. If you are getting higher frames, there will be less recoil, if you have lower frames, you will get more recoil. It is very inconsistent. Is there any better way to handle this kind of stuff in unity and keep it consistent?
Sure, use deltaTime for any movement that happens over multiple frames. Also make sure you don’t use “relative damping”. We could tell you what you did wrong if you have included your code ^^.
By “relative damping” i mean things like Mathf.Lerp used with the current value and a target value.