Search Unity

Collider not working on Z axis on 2.5D Game

Discussion in 'Physics' started by Ofelia_, Aug 30, 2019.

  1. Ofelia_

    Ofelia_

    Joined:
    May 10, 2019
    Posts:
    5
    Hello this is my first post i hope is in the right place.

    Im working on a 2D game top down view, but with 3D physics, so i put the sprites inside the 3D gameObjects, and make invisible the mesh renderer. As i want to use Navigation AI, i used a 3D terrain, and im using the X and Z axis for the 2D world and the Y axis is for the depht.

    Everything was working fine, until i tried to make the player collision on certain areas without access, if the player is colliding trough the X axis (horizontal) is working fine but when the collision is on the Z axis (vertical) the collider make weird things, the player moves herratically.

    I did a lot of tests, the collision is being detected when both objects has a rigidbodys and they are not static, but when they are static or they have a big mass to stop the other, then this bug happens.

    I will appreciate some help! Thank You.
     
  2. Ofelia_

    Ofelia_

    Joined:
    May 10, 2019
    Posts:
    5
    i forget to mention that when the collision is on the Z axis, the player is going to cross the collider entirely like there is nothing, and start moving herratically