Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Collider not working on Z axis on 2.5D Game

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

  1. Dogeveloper

    Dogeveloper

    Joined:
    May 10, 2019
    Posts:
    8
    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. Dogeveloper

    Dogeveloper

    Joined:
    May 10, 2019
    Posts:
    8
    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