- Home /
Positions of the objects in scene view and game view not the same.
We are making a pretty simple 2D side scrolling platformer. We noticed after a while that the player used to fall through colliders the end of platforms, so we it thougth it was a problem with the collision system, but turns out the object has different position in the scene and the game view. Notice in the attached pic that this would make the player seem like he's on a platform in the game view, while in the scene view this is not the case, causing him to "fall through" the platform.
Check for scripting issues, like a huge mass on its rigidbody or a custom force aded on a Start/Awake method
Answer by shashank_gargeshwari · Oct 18, 2017 at 07:50 AM
Answering myself. I was using a perspective camera, but since Z fighting was a big issue, I forced the camera transparency rendering order to be orthographic like so
GetComponent<Camera>().transparencySortMode = TransparencySortMode.Orthographic;
which led to the displacement. Important take away, if your game view and scene view are inconsistent, check if it has something to do with the camera.
Your answer
Follow this Question
Related Questions
Why the colors in the game view are pink and not like in the scene view? 1 Answer
How do I make a scene change when my Player collides with a item? 1 Answer
OnCollisionEnter acts weird when scene restarts? 0 Answers
Sprite Manager sprite is visible in Scene view but not Game view 0 Answers
Scene Load Issues 1 Answer