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

Pages: [1]
Support / Align tk2d Sprite with Unity UI
« on: August 17, 2015, 04:15:18 pm »

I've decided to port my HUD to Unity UI mainly for the great layout and text handling facilities, however, I need to align my HUD to the game map and place some sprites exactly over UI icons. How can I obtain a valid tk2d sprite position given Unity UI rect transforms, for instance, their center and edges, so I can smoothly align and position sprites along UI elements? I've tried fooling around with camera's NativeResolution, TargetResolution, ZoomFactor and rect.sizeDelta, but none of the transformations I tried worked.

Thanks in advance!

Support / Re: Anchors and Flip
« on: February 06, 2013, 12:04:59 am »
OK, I will. Thanks!

Support / Re: Anchors and Flip
« on: February 05, 2013, 11:54:21 pm »
I haven't actually tested the current game in any target platform, only on the player. However, I remember having the same problem with iOS and Android in the final build, for another game. In that situation I had to treat specifically the case when the sprite's scale was negative, i.e, the sprite was flipped, to reposition it to the correct coordinates (for the new anchor).

Support / Re: Anchors and Flip
« on: February 05, 2013, 11:49:01 pm »
I've set it in the sprite collection, via editor. In my code I just call FlipX, I do not change the anchor anytime...

Support / Re: Move tk2dCamera
« on: February 05, 2013, 11:47:59 pm »
I see, so I was missing the point. Thanks!

Support / Anchors and Flip
« on: February 05, 2013, 11:41:54 pm »

I've noticed that if you flip a sprite on the editor, the sprite's anchor keeps working as expected, however, if you flip it on runtime, some crazy behavior occurs. For instance, I've set a center anchor, and called FlipX on a sprite. Since the anchor is in the center, I'd expect the sprite to be flipped around the center, so the anchor would still be at the center, however, I observe it changes to pos.x - sprite width / 2. Is it normal?


Support / Move tk2dCamera
« on: February 05, 2013, 11:24:24 pm »

I've searched the forum and didn't find anyone with this exact issue... I want to use tk2dCamera, because of the facilities it provides, however, since the objects' (absolute) positions are turned into their position on the screen, it is necessary to move the objects, i.e., apply a negative offset to the whole scene, in order to simulate a positive offset in the camera. In most cases, it seems much more intuitive to me moving the camera instead of the objects, when I want the camera to follow a certain object or to achieve a certain movement pattern. Am I missing something here, or is it actually the expected behavior? Is there any simple way to make the objects' relative position to the camera their actual position on screen?

Thanks in advance!

Releases / Re: 2D Toolkit 1.80 + patch 1
« on: November 06, 2012, 05:24:20 pm »
Hi, I had to implement by hand (and with unikron's support help) some patches to apply a global zoom (that only works from the bottom left corner) to tk2dCamera and also to change an animation framerate on runtime, without changing it also in editing time (if you change the fps field of the clip directly at runtime, it will change permantly in the project). I was wondering if there's any new way to deal with these issues in the new version...

Support / Change FPS on runtime?
« on: August 25, 2012, 10:11:48 pm »

I'd like to change the FPS for some clips at runtime. I've first done something this:

Code: [Select]
animSprite.anim.clips [animSprite.anim.GetClipIdByName ("anim")].fps = newFPS;
However, I've had the terrible experience to discover it changes the FPS in my sprite collection permanently as well, not only in runtime. I'd like to keep the initial FPS for my animation as a reference, and change it proportionally to my objects speed. So, a simple FPS scale attribute would be enough for me, but if I could just change the FPS in runtime without changing it permanently in the project it would be fine too.

So, am I doing something wrong or is it the actual expected behavior?


Releases / Re: 2D Toolkit 1.76 final + patch 1
« on: August 18, 2012, 07:43:46 pm »
OK, I've checked all the items in my project, and none of them worked. However, I can't create a minimum test case, because the problem simply doesn't happen in a brand new project xD. The problem aroused when a upgraded toolkit 2D in my existing project, but it apparently doesn't exist with a new project. If I happen to find out what was wrong, I'll inform you. In the meantime, I think you should only concern if more people get to have the same issues...

Thanks for the help!

Releases / Re: 2D Toolkit 1.76 final + patch 1
« on: August 17, 2012, 08:50:31 pm »
Hi, I've been having trouble with this new version. After the update, I started noticing that all my animated sprites get slightly blurred, like if they weren't pixel perfect or if there was some problem with the shaders. My images getting this problem was exactly the point why I gave up implementing a 2D library of my own and started using Toolkit 2D.

I'm quite sure this is a new problem, since I downgraded to 1.75 and had no problem at all. I'm not sure if I'm doing something wrong or if it's actually a bug... Anyway, I wanted to let you guys know, and would like to know if anyone else is experiencing the same problem...

Support / Re: Zoom on 2D Toolkit Camera
« on: August 11, 2012, 09:57:43 pm »
Hi, I could realy use this patch. I'm not using anchors, so they wouldn't be a problem... I've sent them an e-mail too but, in the meanwhile, does anyone know a simple solution for this?


You can't, yet. The reason for this is that there are quite a few unresolved issues on zooming in - what happens to anchors, etc. Also the tk2dCamera's origin is on the bottom left so scaling that will zoom from the bottom left rather than the center, which will be annoying. If a normal camera wont work for you, drop me an email at support@unikronsoftware and I'll give you a patch with a scale number in there, just as long as you're aware the anchors probably won't work properly there...

Pages: [1]