Search Unity

Isometric 2.5D Toolset

Discussion in 'Assets and Asset Store' started by BlackMat, Jan 16, 2015.

  1. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello Zebius!

    Code (CSharp):
    1.  
    2. float tile_angle = GetComponent<IsoObject>().isoWorld.tileAngle;
    3. direction = Quaternion.Euler(0, 0, -tile_angle) * direction;
    4.  
    Something like this for example?
     
  2. Zebius

    Zebius

    Joined:
    Oct 7, 2018
    Posts:
    2
    Problem solved quickly!Thank you!
     
    Last edited: Oct 8, 2018
    BlackMat likes this.
  3. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Hey @blackmat,

    Do you have plans to convert sorting algo to job or even better transfers plugin to ECS
     
  4. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
  5. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello Sylmerria! No, I have not any plans about sorting algo over ECS yet.
     
  6. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Have you docs of references about your sorting algo to tried convert it to ECS ? ( you can send me PM if you prefer)
    Thanks :)
     
  7. langem

    langem

    Joined:
    Mar 18, 2013
    Posts:
    73
    Hi Blackmat,
    I recently purchased your product and I must say it works great. I ran into an problem though:
    I'd like to create a PreFab with the following stucture:

    - 1. IsoParent
    - 1.1 IsoObject
    - 1.2 IsoObject

    My problem is that the positions of the child IsoObjects don't refer to the IsoParent, but to the IsoWorld. That means that whenever I apply changes to the PreFab the "local positions" of all the Child IsoObjects get messed up.
    Is there a way make the IsoObject local? I hope my problem is clean :)

    Thanks in advance and kind regards!
     
  8. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @langem! Thank you for using my plugin :)

    Unfortunately no. Isometric world not supported isometric coordinates child relationships. Best way is using one IsoObject to prefab and don't make complex hierarchies.
     
  9. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    @blackmat ?
     
  10. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    I have not any documentation about sorting algorithm. It's tricky modification of topological sorting. With screen space quad tree optimizations for visible objects. Core classes for sorting is IsoScreenSolver and IsoSortingSolver. IsoScreenSolver can be to parallel execution. But SortingSolver I think no.

    You can begin studing algorithm with LateUpdate function of IsoWorld.

    I hope I could help.
     
  11. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
  12. mngw01

    mngw01

    Joined:
    Jun 18, 2018
    Posts:
    13
    Hi @blackmat
    I have a question on moving IsoObject with Animation.
    I tried to move the key of Position of IsoObject in Animation, but it moved without problems in UnityEditor, but it did not move with the application built on Windows.
    I would like you to tell me how to do it.
     
  13. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @mngw01!

    You should call IsoObject.FixTransform method for every change position property. Property IsoObject.position call it, but Animation not call it (it change internal _position variable without call of property). It's working in editor because editor has many debug checks and these checks calling FixTransform, but in build mode debug check is deleted for performance.
     
  14. mngw01

    mngw01

    Joined:
    Jun 18, 2018
    Posts:
    13
    Thanks for the reply!
    Okay, I will try to respond so that it will run automatically with source code.
     
  15. wfredc1996

    wfredc1996

    Joined:
    Sep 21, 2017
    Posts:
    2
    The scene would crash when undo(ctrl+z) after I move the GameObject(iso object).
    How to fix it?
     
  16. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Thanks for bug report! I see breaking changes in new Unity versions... again..heh. I will fix it as soon as possible!

    P.S.
    It's happening only if scene has IsoObject with "3d mode". You can do not use it while I fixing this problem.

    P.S.S.
    I detected problem with ParticleSystemRenderer.bounds and submitted fix in asset store review. (3.0.4 version). Review process usually take few days and this time I recommend do not use particle systems with 3d mode IsoObject (like Scene00 in Examples)
     
    Last edited: Nov 27, 2018
  17. wfredc1996

    wfredc1996

    Joined:
    Sep 21, 2017
    Posts:
    2
    Thanks for the quick reply!
    I would try to avoid the bug at this moment.
     
  18. Wanderer13

    Wanderer13

    Joined:
    Feb 11, 2016
    Posts:
    19
    Hello. Thanks for this nice plugin! One nuance, it constantly changes transform.localPosition.z for all IsoObjects in scene, so on commit there is ton changes in scene file. It makes almost impossible to detect what really changed in other objects. Is there any solution?
     
  19. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello, Thank you for using!
    At this moment, unfortunately, no... because it's used for sorting object in a scene (includes scene view in the Unity editor). I'll think about it, but I can't promise anything.
     
  20. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
  21. Wanderer13

    Wanderer13

    Joined:
    Feb 11, 2016
    Posts:
    19
    BlackMat likes this.
  22. Jhon_smith023

    Jhon_smith023

    Joined:
    Sep 1, 2018
    Posts:
    7
    Hi @blackmat



    I'd like you to watch the movie, but when you scroll, there are times when the tiles on the edge of the screen become distorted. Do you know the cause?
     
  23. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @Jhon_smith023!

    Can you send me minimal project with this problem? It's will very help me.
     
    Jhon_smith023 likes this.
  24. Wanderer13

    Wanderer13

    Joined:
    Feb 11, 2016
    Posts:
    19
    Hi there again. Seems that animating (using unity animator component) IsoObject's position leads to stepped animation: IsoObject's position changed as it should, but transform's position changed just once in a while. Did you encounter with this behavior?
     
  25. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Wanderer13 likes this.
  26. wlq

    wlq

    Joined:
    Oct 13, 2016
    Posts:
    3
    Excuse me, Do your plugin support pathfinding?
     
  27. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @wlq!

    Unfortunately no, it doesn't support pathfinding. Because of the best way is to implement this feature specifically for your game map structure. Different games have a different structure of the map. Because of this, I can't implement good universal pathfinding that will be supported so different game worlds.
     
  28. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hi @sunrisenova!

    You can use IsoSphereCollider for that. But should be careful because it can cause sorting problems. The plugin sorting algorithm is designed for axis-aligned bounding boxes.
     
  29. wlq

    wlq

    Joined:
    Oct 13, 2016
    Posts:
    3
    Hello @blackmat ,I am studying your plugin. A 3d Player walk in the 2.5d scene. when the player is walking according to setted way points,how to control his real-time orientation ?
     
  30. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @wlq! if I understand correctly your question then you can rotate his child model for example.


    Scene hierarchy:
    - player (IsoObject)
    - player 3d model <-- rotate this
     
    Last edited: Feb 22, 2019
  31. wlq

    wlq

    Joined:
    Oct 13, 2016
    Posts:
    3
    I see,But I dont konw how to realize it? In additon, do you have some good ideas about how to finish AI PathFinding or NPC.
     
  32. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Using this function, you can rotate your model as you wish.

    For example, you can implement any variant A* algorithm for your game map structure. It's not hard if you understand what you are doing and why you are doing that. Also, you can use any plugin for this, but not the fact that it is suitable for your game. Search any resolution of the problem which will be comfortable for you and your project. I cannot help more with it sorry.
     
  33. GameBrosDevelopment

    GameBrosDevelopment

    Joined:
    Feb 18, 2019
    Posts:
    4
    Hi Blackmat, your plugin is plain awesome! It works great for our project. But... ;) I recently updated to Unity 2019.1.0f2 and it seems that the "OnRenderObject" in Isoworld.cs causes some weird editor behaviour. Scenes can't be saved properly (after saving the scenes sets to unsaved) and GameObjects can't be renamed in the inspector. I think "Internal_SetDirtyInEditorMode()" is called directly after the scene is saved. I quickfixed it for our project, but maybe you could consider it in a future update. Thanks and kind regards, Matthias
     
  34. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Oh. Every Unity update something goes wrong. Thank you! I'll check it.
     
  35. GameBrosDevelopment

    GameBrosDevelopment

    Joined:
    Feb 18, 2019
    Posts:
    4
    Thanks for the update. Works like a charm!
     
    BlackMat likes this.
  36. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    You're welcome! :)
     
  37. nissinsupao

    nissinsupao

    Joined:
    Nov 23, 2018
    Posts:
    3
    Hi blackmat.
    This plugin is very nice. Thank you.
    I have a question.
    I want to make a 2d slope using this plug-in.
    How can I make it?
     
  38. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @nissinsupao!

    The current sorting algorithm does not support slopes, unfortunately.
     
  39. GameBrosDevelopment

    GameBrosDevelopment

    Joined:
    Feb 18, 2019
    Posts:
    4
    Not sure what exactly you want to achieve, but keep in mind that 2D positions can be translated quite easily with this plugin: isoObject.position = isoObject.isoWorld.ScreenToIso(vector2); (I'm converting a 2D pathsystem to iso positions) Hope that it helps...
     
  40. nissinsupao

    nissinsupao

    Joined:
    Nov 23, 2018
    Posts:
    3
    Thank you for reply.
    It is a pity that we do not support it.
     
  41. nissinsupao

    nissinsupao

    Joined:
    Nov 23, 2018
    Posts:
    3
    thank you GameBrosDevelopment.
    How do you get that plugin?
     
  42. purpleshadows

    purpleshadows

    Joined:
    Mar 17, 2018
    Posts:
    1
    Hello @blackmat
    We have been using your tool since an early version. Just now we upgraded it to the latest version and as you said, tilemap is gone and there are major changes, for instance, the fact that IsoWorld should be a parent of IsoObject.
    But we don't quite understand that. My guess is that every prefab that implements an IsoObject, should also implement the IsoWorld, but doesn't that create many IsoWorld instances?
    The way I see it IsoWorld is the core and then the objects and everything else communicates with it. In that case shouldn't there be just one IsoWorld instance? At least one per scene?
    What'd be the best approach to this?
     
  43. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Code (CSharp):
    1. Scene hierarchy:
    2. - IsoWorld
    3. -- IsoObject
    4. -- IsoObject
    5. -- IsoObject
    One isometric world for one isometric settings. All isometric objects should be children of this world. Toolset has some examples. Look at them.
     
    purpleshadows likes this.
  44. aNormalGuy

    aNormalGuy

    Joined:
    Jul 22, 2013
    Posts:
    36
    Hey @blackmat, I'm currently doing some tech tests for a future project. I've looked through the forum pages and the Isometric 2.5D Toolset Documentation but can't really get Raycasting to work the way I want.

    If I follow the code snippets from previous replies I can get it to work from the mouse position. But I want to Raycast between two positions in the world (I tend to have transforms as children on my character, then raycast toward walls to see if I'm allowed to walk).

    Do you have any tips for me?
     
  45. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello @aNormalGuy! Just use isometric coordinates of your object for raycast parameters and use IsoPhysics.Raycast function. That's all you need to know for this :)
     
  46. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    @blackmat
    Nice iso Asset you have made =)
    Could you please setup a sample scene, where the pixel per unity is 16 instead of 1? The iso sorting works flawless, but only at pixel per unit set to 1. But this size is kinda gigantic, as 1 pixel = 1m :D

    If I want normal scale, I have to change the PPU to 16 in the sprite settings and then set the tile size property to 1.
    Then, the iso bounds of x and y still works with "size" set to 1. But "z", I have to change to 0.0625 (1/16) for the red iso bounds to match up. But if I do this, the the snapping isn't scaled properly and I can't move the object up and down, as the snapping scale is too big. And somehow the sorting gets mixed up.

    Those problems only occure if I change the tile size in the world settings of a sprite after I changed the ppu to 16.
    Unity Version: 2019.1.2f1, Windows 10, 64

    I used Scene02 and unchecked/hide all objects in IsoWorld but "Cube_1x1x12" to test resizing ppu and tile size.
     
  47. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    Hello, @Zyblade! After that, also you should set "Tile Height" to 1 and all will work correctly :)

    Thank you!
     
    Zyblade likes this.
  48. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    Heh, totally overlooked that property, thanks :D
     
  49. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    I just played around with the "tile angle", a very interesting feature. If I got that right, if the tile angle is 0 or 90, the sorting algorithm could be enhanced from O(n²) to O(n) just by setting the absolute depth to y+z without any further comparison. The pivot point should be then at a certain position though. If this isn't already implemented, it could be a good addition =)

    I got another question. I want to use unitys box collider instead of the isometric ones, because I want to use an already made character controller from another project, which fits pretty good in there. I already know how to fit them into the 2d scene. What I want to know is, would it be better to still use the isoraycasting for performance reasons? Since those are fired within the quadtree? I could setup a benchmark for this, but I thought I ask here first if you already know this =)
     
  50. BlackMat

    BlackMat

    Joined:
    Jan 8, 2015
    Posts:
    269
    In another angle value my algorithm is not O(n^2) too, because I use many smart optimizations instead of a simple topological sorting. More info about that: https://medium.com/@blackmatov/isometric-2-5d-toolset-db8ea204ffca

    Isoraycasting it is just unity raycasting but in isometric coordinates.
     
    Zyblade likes this.