I've tried making jumping with gravity and it never turns out right.
I've tried turning gravity off when colliding but doesn't work. It's because I have so, if you have the jump key down, the gravity turns off and then the jump simulates. But if you are going against a wall, it sticks to it.
If I have the gravity going all the time then the bullets, or orbs, don't come out from the right position. For example, if I have the gravity as -1, then if you're against the ground, the velocity of the player goes to -1 and the the bullet comes out from where I told it to, but - 1.
I hope someone can help me, I just need jumping code that actually works.
I've tried turning gravity off when colliding but doesn't work. It's because I have so, if you have the jump key down, the gravity turns off and then the jump simulates. But if you are going against a wall, it sticks to it.
If I have the gravity going all the time then the bullets, or orbs, don't come out from the right position. For example, if I have the gravity as -1, then if you're against the ground, the velocity of the player goes to -1 and the the bullet comes out from where I told it to, but - 1.
I hope someone can help me, I just need jumping code that actually works.