Search Unity

Isometric grid movement (Orthogonal move)

Discussion in 'Navigation' started by qtpoison, Oct 26, 2020.

  1. qtpoison

    qtpoison

    Joined:
    May 6, 2018
    Posts:
    11
    I am fairly new to Unity, please go easy on me.
    Can you help me to understand how can I achieve this kind of movement?



    Here is the algorithm in my mind:
    1. Create the path: I don't know where to store this kind of temp data and I am not sure how isometric coordinate system works in unity.
    2. Move tile by tile till the end.

    I looked through docs and watched tutorials about Isometric tilemaps but they kinda weren't what was I looking for. I would appreciate it if you could at least point me to the right direction.
     
  2. Skynet766

    Skynet766

    Joined:
    Sep 13, 2020
    Posts:
    22
    Is this a 2D game? I've done isometric, but only on 3D games.

    To do a 2D isometric game, you will need code to map a internal grid (the "internal" game world the computer sees) to what you will render.

    Whatever code lets you render your world, can also be used to translate your pathfinding into what you show there. Your characters will move through a grid (for the AI, they follow a path calculated by A*) and this grid will be a simple 2D grid. Your code will then say "my character is at (233, 455) so I must render them at..." It should just work.

    An isometric camera has no relation to your AI or physics. Think of it this way: in a 3d game, does anything change about the AI path when you rotate the camera? No, because perspective and isometric are a way of rendering the same world. The "physical world" of the game is still the same. You are just showing it differently.