I’m just getting back into Unity after using Unreal Engine for a while, and I’m relearning basic player controlling, such as moving and jumping. I have movement working like it’s supposed to, and I can jump using rigidbody.AddForce, but whenever I’m moving in the air, gravity gets much slower. Any ideas on how to fix this would be great, or if there’s a different way to do movement that would stop this from happening, that would be nice to know. The reason I’m not using the rigidbody for movement as well is because I don’t want to “drift” after I stop holding my movement buttons.
My Code: Imgur: The magic of the Internet
Example of the problem: Imgur: The magic of the Internet
TBH, nothing above really makes sense because unfortunately you’re contradicting yourself or at least that’s how I’m reading it. There is no gravity if you’re not using a Rigidbody nor can you apply forces to a Rigidbody you’re not using. It seems you need to reword what you’re asking.
You’re doing something wrong, it doesn’t mean you need “a different way” because there’s nothing wrong with AddForce or any reason why it affects gravity. This just sounds like you don’t understand what a Rigidbody is for and that you should use its API to cause movement exclusively i.e. never modify the Transform i.e. AddForce, SetVelocity etc. Have you followed any basic 3D physics movement tutorials? None of them would exhibit this problem.
But you can set the velocity to zero to stop so I don’t follow this reasoning.
Please don’t post pictures of code, simply use code-tags and post it in your post. Also, both your images above are the same.