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 - spinner

Pages: [1]
1
Support / tk2dSprite as monobehaviour
« on: November 15, 2013, 03:23:19 pm »
Hello,
I was thinking about the overhead of adding a lot of sprites into a scene.
Since they inherit from MonoBehaviour, does that means that for everysprite unity runtime will iterate over its Update() method?

In that case, if I create a tilemap with let's say 200 tiles (sprites), the runtime will have to iterate over that 200 sprites each frame?

2
Support / Re: Sprites connecting seamlessly
« on: September 29, 2013, 05:11:41 pm »
Cool, thanks! Btw, the trick with the the Pad method worked and now I can use 5 units distance normally. :)


3
Support / Re: Sprites connecting seamlessly
« on: September 29, 2013, 05:07:05 pm »
And in the case I'm using a perspective camera? Is there a way to calculate that?

4
Support / Sprites connecting seamlessly
« on: September 29, 2013, 12:39:21 pm »
Hello,

Imagine that I want to create a tiled bridge with a blue semi-transparent sprite.
Im using 40x40 sprites and Then I'm scaling x40.
What does the final size really means, is there a formula to know the current sprite size? How can I measure the size of a sprite in units so I know exatctly where I can position the next one?
Right now I'm adding the one with x+5, and it's almost correct (as attached), but there's a line between the sprites that I don't want to appear, I want them to connect seamsleesly.

And actually, the sprite itself seems to have a border that I didn't add (as you can see on the image as well). I created a plain blue semi-transparent and yet, after the commit to the atlas, it seems that the sprite collection created a border for it. So even if I add like x+4.95 (which I would prefer having more round values), the line will be there.

What am I doing wrong? Is there any trick or documentation that I need to read to understand how this work better?


5
Support / Re: Z Depth problem when using perspective camera.
« on: September 28, 2013, 09:51:02 pm »
hm, it seems that
camera.transparencySortMode = TransparencySortMode.Orthographic

did the trick.

Thanks.

6
Support / Z Depth problem when using perspective camera.
« on: September 28, 2013, 09:38:26 pm »
Hello,
I'm working on a top down game and I have a bunch of sprites that represent the ground and the 2d chars that are  over the ground, especifically 2 units in Z axis.

Depending on the way the camera moves, sometimes the ground sprite is rendered over the 2d chars, as if the ground has a higher z value than the characters, but that's not the case.
If I use orthografic camera it works fine, but I want to use perspective to work with other effetcs.

Is there any trick that I can use to avoid this behaviour?

Best regards,

7
Support / Re: Mesh collider not being created.
« on: September 18, 2013, 01:59:42 am »
Right, I can understand that.
But actually, I´m using a mesh collider just because I can't use a rotated box collider.
Is there another way to workaround that?

thanks!

8
Support / Mesh collider not being created.
« on: September 15, 2013, 04:11:27 pm »
Hello,

I have a sprite which I added a polygon type collision.
Creating the sprite through unity editor, seems to be working ok. However, if I instantiate the game object through code:
Code: [Select]
GameObject go = new GameObject();
tk2dSprite sprite = go.AddComponent<tk2dSprite>();
sprite.SetSprite(spriteCollection, spriteName);
Then the meshcollider is not being created.

Weird thing that other sprites that use box trimmed or box custom works normally even when instantiated directly on code (using the same template as above.

Is that a bug? or Am I doing something wrong?

Thank you.

9
Support / Re: Dynamic Asset Loading and code wise manipulation
« on: August 18, 2013, 03:26:21 pm »
Right, thanks!

I'm still getting Null reference though, The collection data name "Leve1" is found under the field dataObject on editor settings right?
(Nevermind!)

Btw, great support!



10
Support / Re: Dynamic Asset Loading and code wise manipulation
« on: August 18, 2013, 03:08:51 pm »
I found a way, not sure if it's that right though:
       
        tk2dSprite sprite;
   
   void Start () {
      tk2dSpriteCollectionData spriteCollection = Resources.Load ("Level1", typeof(tk2dSpriteCollection)) as tk2dSpriteCollectionData;
      sprite = tk2dSprite.AddComponent(gameObject,spriteCollection, "texture-1");
      sprite.transform.position = new Vector3(0,0,0);
   }


I am getitng a null reference point with my sprite Collection, So I'm not sure if I'm loading that right.

11
Thanks!
I was missing the "Apply" button before commiting.

12
Support / Re: Dynamic Asset Loading and code wise manipulation
« on: August 18, 2013, 02:58:23 pm »
It seems the code used as response is not valid anymore with the new 2Dtoolkit API.
What's the new way to instantiate and render sprites dinamically?

Thanks.

13
Support / Automatically set Collider type for all sprites in collection
« on: August 18, 2013, 02:37:50 pm »
Hello,

I'm creating huge collections and I was wondering if there's a way to set the collider type automatically for all of them. I feel that it's a waste of mouse clicks to set them all manually with box trimmed for example.

Thanks.

Pages: [1]