Hello,
I’m new in Unity. I’m making a 2D game to learn.
I have a 2D player who have rigidbody2D and a circle collider2D.
I place tiles in the scene with collider2D.
On player and tiles, I put a PhysicsMaterial2D with friction set to 0.
My tiles are leaned, so the player should slide on it.
But my player is translate on x and y slowly.
void FixedUpdate(){
float h = Input.GetAxis ("Horizontal");
movement = new Vector2 (speed.x * h, rigidbody2D.velocity.y );
rigidbody2D.velocity = movement;
}
Anyone have an explication ?
Thanks.