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 - Afro-Ninja

Pages: 1 [2] 3
16
Support / Re: Error when creating a new TileMap
« on: November 20, 2013, 09:03:01 pm »
Ah, I don't use the tk2d camera. I started using a regular perspective cam + ortho sorting back when the tk2d cam wasn't able to handle perspective and zoom. I also make use of an AspectRatioEnforcer that modifies my main cam. I'm afraid that switching to tk2d cam now will break my current solution.

are you saying that if I place a tk2d cam on the stage and correctly set the ppm, any future tile maps I create will start at the right size?

or do I just need to set the ppm for the sprite collection that contains my tiles, and the tiles will appear at the right size?

Defaultly, my camera sits at Z -10, while everything else is at Z 0. The documentation talks about the use of pixels per meter, but I've never been 100% how to actually calculate the ppm that I need.

17
Support / Re: Error when creating a new TileMap
« on: November 20, 2013, 05:48:27 pm »
got it, thanks. one other question:
what is the proper way to 1:1 a tilemap? through the regular unity inspector properties?

After clicking 1:1 on my sprites I've found that the correct scale for the camera is roughly 5.77.
The tilemap however has no 2dtk 'scale' property like regular sprites do, so I just set the gameobject scale to 5.77.

I assume this is fine but just wanted to make sure I didn't miss anything.

18
Support / Error when creating a new TileMap
« on: November 20, 2013, 06:39:20 am »
Unity 4.3, 2dtk 2.3.0

I create a new tilemap (with no map data or editor data or sprite collection set) and get the following error:

NullReferenceException: Object reference not set to an instance of an object
tk2dTileMap.Awake () (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:107)
UnityEngine.GameObject:AddComponent()
tk2dTileMapEditor:Create() (at Assets/TK2DROOT/tk2dTileMap/Editor/tk2dTileMapEditor.cs:1267)

tilemap seems to behave fine, just not sure what causes this.
thanks!

19
Releases / Re: 2D Toolkit 2.3.0
« on: November 13, 2013, 07:10:23 am »
are tilemaps automatically included in the 'default' sorting layer?

also am I correct in assuming that tilemap layers will have their layer sort order correctly applied without having to change the z?

20
Support / Re: Specify sorting order for tilemap and tilemap layers?
« on: November 03, 2013, 07:59:04 pm »
sorry dumb question, I can just use a print statement to see that it only runs once.

21
Support / Re: Specify sorting order for tilemap and tilemap layers?
« on: November 03, 2013, 07:41:57 pm »
thanks, I think I have a basic working version in, making use of the AdjustedMeshBounds function from tk2dbasesprite, and basically passing in the tilemap layer id in place of the render layer.

does the build function only get called once upon the creation of the tilemap itself? just want to know if I need to clean up the code a bit if it's something that gets called often.

22
Support / Re: Specify sorting order for tilemap and tilemap layers?
« on: November 02, 2013, 08:13:26 pm »
Is there anything I can hunt for in the source code that may let me accomplish this? Or is the code that handles the relevant functions too disparate?
I know Unity 4.3 is introducing new 2d tools, including render layers, are they also adding functionality for rendering on the same Z?

23
Support / Specify sorting order for tilemap and tilemap layers?
« on: November 01, 2013, 08:23:04 pm »
This feature has come in very handy for regular sprites, I was wondering if there is any way to implement it into the tilemap layers.
For example my tilemap has two layers, and right now I have them set with a zOffset of 0 and .0001. This works for the most part, but I feel like I am still able to detect a small amount of flickering between the layers as they are not quite on the same z index. Is there a way for them to share the same Z with a different render order?

24
Support / Re: Creating a 3d gui with StaticBatcher?
« on: September 19, 2013, 08:28:03 am »
After some testing I got it to work, but my solution was a bit arbitrary.
Based on what you said, is this changing the sprite's position along the z axis in the direction of its normal? With the rotation I was working with I found that I had to set my top elements to a sorting order of 50, while changing my bottom element to a sorting order of -300. I also found that once I reached a sorting order of ~700 the object disappeared entirely (assuming that this put the object's virtual axis out of the range of the camera entirely)

25
Support / Re: Creating a 3d gui with StaticBatcher?
« on: September 18, 2013, 11:50:53 pm »
Interesting, I didn't realize that 2.2 was out now. Will have to check this out. I assume this works properly even with a perspective camera as noted?

Also I'm curious, if you don't mind, what do you use to achieve this sorting effect? I know you can modify material.renderQueue in code, but this only affects the order of rendering, not the actual depth used to determine occlusion.

26
Support / Creating a 3d gui with StaticBatcher?
« on: September 18, 2013, 07:17:22 pm »
My goal is to create a 3d pause menu that floats above the game screen with a slight 3d rotation. Conceptually this isn't a problem- I just build a gui out of sprites and set the rotation of the gameobject to pop it out. All of this is filmed by a perspective camera with sort mode set to orthographic. The camera is set to appear on top in the camera stack.

However, the issue is that if I slightly rotate the menu, the objects near the back (in regards to z axis) will start to occlude objects in front. Here is an example:
http://i.imgur.com/H2d4R8B.png

In the picture you can see that the words on top are much darker. They should be the same as the white words, but the transparent 'backing' counts as closer to the camera than them at the angle, and so it appears on top.

Is it possible to make use of the static batcher (http://www.unikronsoftware.com/2dtoolkit/docs/2.20/advanced/scripting_static_sprite_batcher.html) so that the elements are all drawn together as one sprite, and always appear on top? My gui will consist of a mixture 2d sprites and 2d text meshes. Also keep in mind that the gui will change as the user cycles through the different choices.

27
Support / Re: Will sunshafts work with 2dtk?
« on: September 02, 2013, 06:25:25 pm »
ok, gotcha.

do you think it would be possible to create some basic 3d geometry to act as the edges, and then use a shader to turn the geometry invisible?
I'm not sure if it's possible to get the shafts to show through a transparent object correctly.

thanks!

28
Support / Will sunshafts work with 2dtk?
« on: September 02, 2013, 04:14:52 am »
I don't have unity pro but one of the reasons I would like to get it is for the image effects, especially sunshafts:

http://docs.unity3d.com/Documentation/Components/script-SunShafts.html

will these shafts show correctly through a bitmap image? like if I have a bitmap of trees and the top section is transparent, would the light beams show through correctly?


29
Support / Increasing time for commit to occur?
« on: August 27, 2013, 10:08:19 pm »
I've noticed that as my sprite collection grows that my commits become slightly longer. Right now my sprite collection has about 60 sprites (2048x2048, ARGB 32 bit, 21 MB). When I add a sprite and commit it takes a full 3-4 seconds to finish. If this is normal then that's ok, but I still have quite a few sprites to add. I will eventually break up my collections a bit more, but one collection still may contain a lot of content. Should I expect the time to grow steadily as the project size increases?

30
Support / Changing shader for tilemap (lighting)
« on: July 25, 2013, 10:31:40 pm »
I searched and found this topic:

http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1080.msg5241.html#msg5241

and just wanted to know if there was any follow up to it, or any changes/fixes since this release.
should I still do what maas suggests and just comment that line so the normals are always recalculated?

Pages: 1 [2] 3