Dayum today’s time is kinda long cuz i was being a dumdum
What happened was since in a physics system we have the graphics, collision and physics so I thought of making different classes which was not a good choice so I spent a REALLLLLLLLYYYYYYYYYYYYYYY long time making those classes and since I wanted it to be inherited the system got really messy and I just kept getting error and errors.
So, I stopped and now I am no longer fighting for my life.
But then I spent some time making the wall collision a bit better, I improved the logic and also the way positioning happens in it and now the collision is extremely smooth and good looking and it no longer overlaps.
After that worked I added gravity which was simple unless you are like me who spent a lot of time but the solution was just one line away.
I just had to decrease velocity as per gravity * dt because gravity is second derivative but I kinda tried to mix things and update the velocity and position as the same time.
I also added a reference to delta time in main class this way the delta time stays consistent
Now I am gonna add a position correction system for object to object collision and then I will be more than 60% done with my project (or so I hope)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.