- Home /
Need insight on strange (simple) 2D object transform bug
The player gameObject is coded to move its position down to the level below when it hits the exit, using transform.position and rigidbody2D.movePosition(). But after hours of tinkering around with rigidBody2D and debugging the scripts, the player object still flies around between the first and second level the moment it hits the exit. Mostly recently, we've tried to reset the stage so that the player's initial position is on the second level, but it still bugs out.
Example GIFs: http://gyazo.com/c2e6937ee4fe8362c81fc1d5cd0829c9 http://gyazo.com/4e8936944117d86ab855530c1ba91ccd
Can someone give some insight on this bug or point us in the right way? Sorry if this is something obvious(relatively new to Unity), but couldn't find any solutions looking through the forums/google.
$$anonymous$$y guess is there's something wrong in your movement code. It's hard to say without being able to see it.