- Home /
Gravity keeps my player from moving
Hi, I'm creating a 2D Platformer/Metroidvania game and I've encountered a problem.
When my character is touching the ground, it takes significantly more force for them to move, even if the player's rigid body is set to no Linear Drag.
This is the line of code I use to move the player;
playerRB.AddForce(Vector2.right * xInput * runForce, ForceMode2D.Force);
Essentially the ground seems to have a friction value that I am not aware of, can anyone help me find it or fix it?
Additional When rotation is not frozen, the player's rb seems to rotate an infinitesimal amount, and if I set the tilemap to dynamic, attempting to move ends up rotating the tilemap. I can easily prevent this from happening by just freezing rotation, that's not an issue, but I thought that might help figure out what's happening.
Answer by BlobOfAwe · Aug 17, 2020 at 06:37 PM
Update: The default "No material"-material does have a default friction value. There is a way to change it, but the simplest thing to do is to create a "Zero-friction" physics material and apply it to the Tilemap's Rigidbody