Hello, I am currently making a platform game where every tick, the gun sets its angle to Mouse.X, Mouse.Y, but how can I make the gun move for recoil if it would go against this code?
Here is a demo:
dropbox.com/s/1im9m3usr05vgqc/GunRecoil.capx
Thanks! Is it possible to do the same thing but vertically for a bullet spread? Like with a random recoil value that gets higher if you hold the click?
Develop games in your browser. Powerful, performant & highly capable.
I don't understand your question, sorry. Here is a version for automatic fire:
No problem, I made a bullet spread instead, but still used your code to make a visual recoil on my guns. Thanks bud!
But is there any way to make in sort of that the recoil value doesn't take any crazy numbers?
You can use clamp() or min() expressions. For example, Set recoil to min(recoil+10,30)