Search Unity

2D Physics on the XZ plane

Discussion in 'Physics' started by jpthek9, Jan 7, 2015.

  1. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    I'm making a top-down RTS game that only requires 2D physics and I'd like to implement it for performance and determinism reasons. The game is already built on the XZ plane with Y as height and it would be a hugely cumbersome undertaking to transform the game onto the XY plane. Can I use Unity's 2D physics on the XZ plane or are there any 3rd party solutions to help me with this?
     
    Last edited: Jan 7, 2015
  2. djmenon

    djmenon

    Joined:
    Jul 30, 2012
    Posts:
    3
    I think Unity2D Physics is designed to operate on x-y plane. Refer http://answers.unity3d.com/questions/742020/why-is-my-box-collider-2d-z-position-not-following.html
    My game was initially using Physics2D in the x-z plane. If its collisions only and not really rigid body physics that concerns you, you could do an Physics2D.OverlapCircleAll at every frame to detect collision properly. But I ended up converting the scene to the XY plane because of the Rigidbody2D physics involved - wasn't much work actually.