I’ve been trying to reduce dependancies in my project through scriptable objects and what I ended up with right now is this weird problem. Whenever my scripts recompile and I run the game once, everything’s normal. But if I run the game again, the player object I’m controlling seems to be setting its velocity as the last velocity it had in the last run, from what I’ve gathered. I don’t think I store that velocity anywhere, when the game starts the InAir state the object is in starts constantly updating rigidbody’s velocity by adding X input to it, but it worked normally before, I don’t understand why it started behaving this way suddenly. The biggest change I did today was move the state the player can enter from code to scriptable objects, but none of them store the object’s velocity.
I realize that this issue is very specific to my own code, but I"ve been trying to fix this for hours and can’t seem to find the reason, so this forum is my last resort at the moment. Maybe someone had a similar problem before?