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

Pages: [1]
1
Support / Re: GetBounds not working anymore
« on: November 25, 2013, 03:47:59 pm »
My error, sorry. My tk2dSprite reference was null because I was doing something wrong, hence the GetBounds not working.

2
Support / GetBounds not working anymore
« on: November 22, 2013, 11:17:25 pm »
I recently switched to Physics2D and I noticed Collider2D doesn't offer a Bounds method. Likewise, now tk2dBaseSprite.GetBounds() doesn't work either.

The purpose of using Bounds was to get the center of the sprite, is there a workaround this? (I'm already using attach point so don't suggest that plz).



3
Support / Re: Physics 2D problem
« on: November 22, 2013, 10:53:09 pm »
That solved my problem. Thanks ;)

4
Support / Physics 2D problem
« on: November 21, 2013, 04:21:48 pm »
I've switched all my sprite atlas to physics 2D, however my collision detection does not work anymore, even simple things like BoxCollider2D.

I'm doing collision detection like this:

Code: [Select]
Ray ray = hudCamera.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit = new RaycastHit();
            // check hits on HUD
            if (Physics.Raycast(ray, out hit, Constants.HUDRayDistance)) {


Is there something else I should be changing?

5
Support / sprite problems rendering demo
« on: November 18, 2013, 03:29:47 pm »
I've installed 2dTK version 2.3.0 on the free version of Unity 4.3, and I'm getting a weird problem with sprite display. Look at the image attached below.

This happens to me in a clean new project after importing 2dTK, and also on my existing projects. Any ideas? Is this because I'm using the free version of Unity?

6
Support / Re: Performance questions
« on: November 13, 2013, 04:25:45 pm »
1. If I place them in a SSB the SSB rebuild happens automatically during runtime everytime I re-tint my sprintes, or do I have to trigger it via code?

2. That's what I'm currently doing already. Thanks :)

8
Support / OpenSource projects using 2DToolkit
« on: November 11, 2013, 03:27:19 pm »
I've made an effort searching on both the forum and on Google but failed to find any open-source projects using 2D Toolkit. Even the Ludum Dare projects don't have their sources available. I don't know about you guys, but I usually learn a lot by simply exploring free projects and reading through the code itself.

The only one I really know of is the Demo projects that bundle with toolkit, and the Whack a Mole from the documentation's tutorial. So I found I should ask if anyone knows of more projects that are using 2D Toolkit and are open source, and if there are we could possibly start maintaining a list here ;)

9
Support / Performance questions
« on: November 11, 2013, 03:01:55 pm »
I'm doing a top down game and I'm using a lot of sprites on top of other sprites (background, terrain, terrain details, characters) etc. Any special recommendations to this use-case?

1. There are big chuncks of the background that all belong to the same atlas and in runtime I've to change the color of each of this sprites dynamically. Do I still have some advantage by creating a Static Sprite Batcher since they all come from the same atlas, or does the fact that I'm tinting the color of each sprite to a different value makes SSB useless?

2. This same chunks are map areas on my game, and I just need to be able to click on them. I've created polygon mesh for all of them, and selected Collider Cap = Front because I don't need the back. But I also don't need to detect collisions between the area maps themselves, just need to handle clicks (or touch events on case of mobile) on them. Is there a way to cap so that I only have "Front" and not the lateral collider that is typically needed for say side-scrollers ?

Thks in advance

10
Support / Re: mipmaps clarification
« on: October 24, 2013, 02:19:26 pm »
Thank you for the reply :).

I can't use multiple atlas because I'm dicing the images. Got it, I'll just use the "mip maps" option in the sprite collection. I'm assuming mipmap works just as well with dicing, yes? (If I wanted to, how can I know how many images are generated by the mipmapping, and can I have finer control when Unity chooses one level over another?)

11
Support / mipmaps clarification
« on: October 23, 2013, 03:07:58 pm »
Hi,

I'm doing a top-down game and all the scenario is mainly contained within atlases. The game allows for zooming in and out, so I'm interested in using mipmaps to keep it from loading a huge amount of memory when zoomed out (which will make a really big area visible).

There is a mipmap option in both Sprite Collections, and on the Textures themselves. What are the differences? Should I use both, or just one of the options, and why?

Also on the Sprite Collections there is an option named "rescale", what does the value here actually do? (it defaults to 1..)

PS: the last information should be added to documentation here IMO: http://www.unikronsoftware.com/2dtoolkit/docs/2.2/reference/sprite_collection.html

Thanks in advance.

Pages: [1]