Unity 5 Player Floating

Hi there, working on a 2d ‘endless runner’ style platformer, and when I updated the project to Unity 5, the player still runs at the same horizontal velocity, but it appears to have no gravity effects (I did check gravity and mass in the rigidbody, they’re unchanged since Unity 4 version). Also the player doesnt just float mid-air on the y axis but appears to go a little bit upwards.

transform.position = new Vector2 (Speed * timer, transform.position.y);

Thats the line of code I use to make the player move rightwards, where timer is essentially just Time.timeSincelevelLoad, possibly a change in unity 5 makes it not work?

Any help would be appreciated, thanks

Seems that ‘Apply root motion’ had been checked on the animator after updating. Unchecking it fixed the problem for me.

I created an empty object and just added all the components and children that the original ‘player’ object had. Basically cloned it, and now it works okay, must’ve just been some sort of bug due to upgrading to Unity 5 ;/

EDIT
The problem is not a bug, when updating, “root motion” was activated in the animation component. Just uncheck to fix :slight_smile: