On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

anyone know any platformer code (C#)

A topic by UndercardGames created Mar 15, 2022 Views: 119 Replies: 3
Viewing posts 1 to 4

I use unity. And I know how to  move the player and such, but when the player gets to the edge, he kinda topples over and flips and such. And also sticks to the side of surfaces. Anyone got any suggestions?

Submitted

Sorry if this is not much help, but to prevent your character from spinning after falling make sure you freeze the Z rotation on your rigid body! Hope this helps.

(1 edit)

you could create a material and set it to 0 friction. Then attach it to either the collider you want to be frictionless or the rigid body, which would make all the rigid body's colliders 0 friction.

you could also experiment with https://docs.unity3d.com/Manual/class-PlatformEffector2D.html