Hello, I have this current issue on my Roblox game which is the gun swaying.
My game is highly inspired off DOOM from 1993 and DOOM II from 1994.
I have a big issue on trying to replicate the gun bobbing, I know it uses sine waves, but I don’t really know how to code it.
Do not judge the gun positions that look kind of weird as I just changed the UI to a more accurate one.
I will put in here a video showing my attempt in recreating it and how it looks in the actual game here.
I am using TweenService in this attempt, I do not know if I have to use a different service or thing.
Thanks.
I think animating it by hand is going to give the best results but might be a bit tedious.
As for the bobbing, you could use a sine for the X and cosine for the Y axis.
And offset the Y axis by a certain amount so it creates sort of an half-circle.
I might actually try this out myself later, if I do I’ll be sure to share the code if I get decent results.
Alright, I will wait some time.
I don’t know if making the bobbing by hand is gonna be the best idea though, since the code for the bobbing is already kinda bad, xD