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

Pages: [1] 2
1
Support / Re: Collider glitch (sprite being pulled into collider)
« on: September 07, 2016, 12:27:09 pm »
I identified the problem: https://www.youtube.com/watch?v=19IEFWtWQFg

It seems as if the collider isn't put together correctly. I suspect the "WeldVertices()" routine in tk2dTileMapColliderBuider2D is the cause of this.

2
Support / Collider glitch (sprite being pulled into collider)
« on: September 04, 2016, 08:28:31 pm »
Hi there,

I am experiencing a strange issue regarding 2D colliders. I have a tilemap set up that uses tiles with different collider types. Most of the time, everything works fine, but there is a case where the player is not repelled by an obstacle but rather pulled directly into it. And I can not explain why this happens.

I made a quick video of the issue and my setup here: https://www.youtube.com/watch?v=omz3CQWSMBQ (it has annotations to highlight what's going on)
Any idea what's happening and what can cause this?

Greetings,
Pfaeff

PS: Crosspost in the Unity Forum: http://forum.unity3d.com/threads/collider-glitch-sprite-being-pulled-into-collider.429606/

3
Support / [SOLVED] Workflow in SpriteCollection
« on: September 03, 2016, 04:23:38 pm »
Hi there,

I have a SpriteCollection with sprites generated from a sprite sheet with 1024 sprites in it. I now want to edit colliders for some of those sprites.
My problem is, that it is very hard to find them just from the list of sprites. I'd rather see the entire spritesheet as I imported it and select the sprites I want to edit from there.
Is it possible to get such a view of the sprites?

I don't have this view:
http://www.2dtoolkit.com/doc/2.4/tutorial/img/spritesheet_3.png

I can only see one sprite at a time. I also dont have the "Edit" and "Config" buttons.


EDIT: I found that right at the bottom of the lists of sprites there is my stylesheet, which I can select and then I have the view I need...  :-X
But it seems to edit the collider, I still have to manually select the individual sprite. But now I atleast now which one ;)

Greetings,
Pfaeff

4
Support / Re: How to play animation in reverse?
« on: September 10, 2013, 06:20:32 pm »
I've come upon this (and a few other similar) topic while searching for a way to play reverse animation. I need to reverse my animation in specific frames according to user input so having a reverse version of that animation doesn't cut it for me. Is there any simple way for reversing direction of an already playing animation?
Isn't it possible to jump to a specific frame of an animation? Using that and a reverse version of your animation, you could build a system on top of the 2dtk animation system to get the results you want.

5
Support / Re: Detecting what tile your player lands on.
« on: September 07, 2013, 03:19:50 pm »
You can use a prefab on the block that has the logic for launching your player in the air. You can assign these prefabs in the tilemap under "data".

6
Support / Re: Tilemaps are amazing, but how do I dynamically create them?
« on: September 01, 2013, 04:34:56 pm »
You could use
Code: [Select]
tileMap.Layers[i].SetTile(x, y, id)to set the tiles at runtime. You can get the id via
Code: [Select]
tileMap.SpriteCollectionInst.GetSpriteIdByName("YOURSPRITENAME")
At the end, use
Code: [Select]
tileMap.Build()to build the actual tilemap.

7
Support / Re: Ignore Collisions From A Specific Direction
« on: September 01, 2013, 04:29:15 pm »
I have such platforms in my game and the way I do it is like this:



I have two Colliders. One to stand on and another (the big one) as a trigger. The latter has the script attached to it. I use it as a prefab in my tilemap, but it doesn't have a Sprite attached. The image that you see in the game is from another layer. That way I can use the same prefab for different images.

This is probably not the most elegant way to do it, but it works well.

8
Support / Re: TileMap Lighting at Chunk borders
« on: August 26, 2013, 03:07:04 pm »
That seems to work. Thank you very much.

9
Support / TileMap Lighting at Chunk borders
« on: August 26, 2013, 02:34:08 pm »
Hi,

I am using unity lighting for my tilemap. It works fine, but I get flickering edges along the borders of a chunk. I tried to increase the chunk size to my map size, but it reverted back to a width of 32.
It doesn't look too bad on this screenshot, but it looks really weird when the light suddenly switches from bright to dark and vice versa:

https://dl.dropboxusercontent.com/u/27681596/chunkslighting.png

Any idea what could be causing this? Thank you.

Greetings,
Pfaeff

10
Support / Re: Prefab in Tilemap graphic override
« on: August 23, 2013, 11:16:59 pm »
I could also put it on an extra layer in front of everything and make it have no sprite at all. This way I can set the sprite I want to display in a background layer.

11
Support / Re: Changing shader for tilemap (lighting)
« on: August 20, 2013, 11:06:08 am »
I wanted to enable lighting for my tilemaps. What I did, was simply add
Code: [Select]
chunk.mesh.RecalculateNormals();below
Code: [Select]
chunk.mesh.RecalculateBounds();in the BuildForChunkRoutine and it seems to work just fine.

12
Support / Re: Prefab in Tilemap graphic override
« on: August 19, 2013, 10:24:53 pm »
The only other way I could think of is read the sprite image off the tilemap at the prefabs position. Is there a way for the prefab to know its position or do I have to go through the entire tilemap at the beginning to set everything up? Thank you.


13
Support / Prefab in Tilemap graphic override
« on: August 19, 2013, 07:44:11 pm »
Hi there,

I have a tilemap and want to attach a script to certain tiles, so I use a sprite as a prefab. That's fine. But if I want to have the same script running for different looking tiles, so I have to make a prefab for each one of them and change the sprite. It would be nicer, if the sprite could just use the image I chose from the tilemap spritesheet, but that doesn't seem to be possible at the moment.
Is there another elegant way to do it? Thanks a lot.

Greetings,
Pfaeff


14
Support / Re: [TileMap] Edit tilemaps during gameplay
« on: March 06, 2013, 05:13:57 pm »
Thank you very much. Yeah, I figured that if the radius in which I update the colors is smaller than the chunk size, I would have a maximum of 4 chunks to update. The size of those chunks I want to keep to a minimum of course, so 16x16 seems fine for now. I will have a look at your suggestion about building only one chuck per frame. What I do at the moment is I am building every 100ms and it still looks fluid enough, though the framerate has increased dramatically. I have to do some further testing, though. Thank you for your awesome support.

15
Support / Re: [TileMap] Edit tilemaps during gameplay
« on: March 06, 2013, 04:15:19 pm »
Thank you. Does it mean that if you only make changes in a certain chunk, the update would be more efficient, because only that particular chunk would be marked as "dirty" and thus being the only one that is updated?

EDIT: I was using 32x32 sized chunks. Now with 16x16, I get about 10fps more. 8x8 is actually worse. The "radius" in which I update the color layer is 10x10, so I think 16x16 is a good choice.
I will also decrease the update rate, so that this is called in certain time intervals instead of every frame.

Thanks again.

Pages: [1] 2