Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Artheus

Pages: [1] 2
1
Support / Re: Drawing lines using the GL class
« on: January 21, 2014, 10:25:24 pm »
I wanted to avoid Vectrosity for as long as possible (30 bucks is kinda steep) but I bought it now and it works perfectly.  Thanks for the help.

2
Support / Re: Drawing lines using the GL class
« on: January 20, 2014, 10:10:04 pm »
I'm just using the default 2d toolkit camera set to orthographic and no, it doesn't work with a unity camera set to orthographic.  What does that mean?

3
Support / Re: Drawing lines using the GL class
« on: January 20, 2014, 09:53:12 pm »
Do you have any examples using the GL class?  And I'm just using the points from from my units position and it's path, what kind of transformation do I need to do?

4
Support / Drawing lines using the GL class
« on: January 20, 2014, 09:21:23 pm »
I'm trying to draw the paths of my units using code from this page: http://wiki.unity3d.com/index.php?title=VectorLine but can't get anything to show up.

Does anyone know of a good solution to draw things to the screen?  Does the GL class even work with 2d toolkit?

5
Contract Work / Re: [paid] Tilemap pathfinding
« on: November 15, 2013, 11:07:46 pm »
It doesn't seem to be 100% accurate.  Walkable nodes will still connect to non-walkable nodes like this (the gray walls have colliders on them):



I'm trying to figure out why but has anyone else encountered this problem?

6
Contract Work / Re: [paid] Tilemap pathfinding
« on: November 14, 2013, 07:32:39 am »
For some reason, I can't get the Draw Map in Editor option to work.

Ok, you have to look at the editor window while the game is running.

7
Support / Re: Has anyone used astar pathfinding with tile map?
« on: November 13, 2013, 10:50:54 pm »
Has anyone got this working with the grid graph?

8
Support / Re: Get tile position under mouse in the scene view.
« on: November 09, 2013, 08:32:50 pm »
Once again, thanks alot.  I finally got my units to snap to the grid inside the editor window.

Btw, how does UpdateCursorPosition work?  Are you basically creating a temporary plane over the tile map and then using a raycast hit to detect the mouse position?

9
Support / Re: Get tile position under mouse in the scene view.
« on: November 07, 2013, 10:22:13 pm »
Ok, so I managed to jerry rig it to work but I had to comment out anything to do with layerDepthOffset...is that good or bad?  I have no idea what tk2dTileMapEditorData editorData is or where to get it.

10
Support / Re: Get tile position under mouse in the scene view.
« on: November 07, 2013, 09:31:21 pm »
How do you invert the Y axis for the scene view?  The tile map origin is the bottom left and the scene cam origin is the top left so when I mouse over tile (0, 0), sceneCam.ScreenToWorldPoint(e.mousePosition) will return the (0, tile near top of camera) instead.

11
Support / Get tile position under mouse in the scene view.
« on: November 05, 2013, 11:42:37 pm »
Subject says it all.  How do I get the tile position that's under the mouse in the scene view?

My current attempt looks like this:

Code: [Select]
void OnSceneGUI(SceneView sceneView)
{
        Event e = Event.current;
        int xx, yy;

        if (e.type == EventType.MouseDrag && e.button == 0 && e.isMouse)
        {     
                tileMap.GetTileAtPosition(tk2dCamera.Instance.camera.ScreenToWorldPoint(e.mousePosition), out xx, out yy);
        }
}

Unfortunately, the world position from the camera changes anytime I pan and is completely different from the tile map world position.  For example, even though my mouse is over tile (0,0), xx and yy depends on the position of the camera.

12
Support / Re: How do I reference 2dtk objects in code?
« on: November 04, 2013, 09:51:51 pm »
Sorry to bring up an old topic but I'm writing an editor script and can't use the drag and drop to make a reference to the tilemap.  In this case, is GameObject.Find() my best option?

13
Support / Re: Snapping sprite to grid
« on: October 08, 2013, 07:32:04 pm »
Perfect, that's all I need for now.  Thanks alot.

14
Support / Re: Snapping sprite to grid
« on: October 08, 2013, 07:21:47 pm »
Ok, I see what your saying. 

I have all the anchor points set up for my tiles and sprites.  I should place my sprites approximately where I want them to go, and then during run time, I should check which tile the is sprite is standing over, and snap it to the center of that tile.

I thought about it doing it this way, but I actually wanted to change the way the editor worked so my sprites would snap to the center of the tile when I place them, before run time.  That way, I can see exactly how they would look.  Would it possible if I subclassed the TK 2d sprite object?

15
Support / Re: Snapping sprite to grid
« on: October 08, 2013, 07:07:58 pm »
Where should I do this?  I don't see any options in the editor itself, are you saying I should do this when I run the game?

Pages: [1] 2