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

Pages: [1]
1
Support / Re: Tk2dCamera, Tk2dTextMeshes, and perfect pixel placement.
« on: September 30, 2014, 04:33:51 pm »
So good -- thank you for your help. I'll give it a go tonight!

2
Support / Re: Tk2dCamera, Tk2dTextMeshes, and perfect pixel placement.
« on: September 30, 2014, 01:42:14 am »
Inherit Config: None
Native Res: 600 x 1024
Preview Res: 480 x 800
Projection: Ortho
Type: Pixels Per Meter
PPM: 1
Origin: Bottom Left
Zoom Factor: 1

Overrides: Wildcard Override w/ default settings (is this the issue?)

3
Support / Tk2dCamera, Tk2dTextMeshes, and perfect pixel placement.
« on: September 29, 2014, 04:04:11 am »
Heya, this may be an easy fix, but I'm having a hard time with it.

I am currently using tk2dtextmeshes with a tk2dcamera, and I am trying to position them at runtime on exact pixels so the text looks perfect.

For instance:

textMesh.transform.position = new Vector3(Mathf.RoundToInt(Screen.width - (20f * resolutionAdjust)), . . . );

This X value is a whole number at runtime (if screen.width is 480, this debug.logs as 468 given my resolution adjust). However, after it gets repositioned automatically to the tk2dcamera (which translates everything to a 0,0 center on the screen) the new X in the editor is 291.84. I'd love to round the new value to the nearest integer for crisp text, but I can't figure out how.

Any advice?

Thanks for your time. :)

4
Support / Word Wrap justified right and spaces.
« on: March 04, 2014, 01:19:34 am »
Heya, just wondering if someone could help me figure out a hack for tk2dTextMesh. I notice whenever I anchor text right and use word wrap, the spaces get pinned to the ends of the line-ending words, instead of being attached to the front of the word moved to the next line (the opposite of what needs to happen with left justification). The effect is a space at the end of every non-final line-ending word, creating a jagged justification.

Any easy way to fix?

Thank you for the help!


5
Support / Re: Wildcard Camera Override change in 2.0?
« on: June 27, 2013, 07:23:26 pm »
Yep! That produces the same results. Here is a screenshot. The shopUI in the center is set to x=0, y=0, z=0. Camera is at x=0, y=0, z=-100. The force editor resolution box unchecked on run.

Also interesting, if I change the native resolution numbers in the editor, the camera moves in relation to the screen as well (both during and after run). However, changing the native resolution to the same resolution (600x1024) does not result in perfect positioning -- the sprites are correct on the x axis, but a bit low on the y axis.

I programmatically change the size of my sprites based on Screen.width and Screen.height using transform.localScale. Would that also mess with it?

Let me know if I am making some simple mistake. :)

EDIT: Apologies. After messing with it, changing Fitmode to constant and x=0, y=0 seems to have fixed it. Whenever I programmatically center a sprite, I set its XY postion to Screen.width/2 and Screen.height/2. I assume if the Fitmode is set to center, it pushes all sprites at those XY coordinates away by the difference of the camera moving from 0,0 to center, or something of the like?

6
Support / Re: Wildcard Camera Override change in 2.0?
« on: June 26, 2013, 10:06:32 pm »
Hmm... wasn't all that old. 1.8 or 1.9ish, so actually fairly recent.

Here is an attachment of my camera settings if it helps. Once again, this works fine in editor, but is not working on my Galaxy Samsung Tablet. Oddly enough, as I said before, Wildcard settings that I have not deleted and recreated since 2.0 are still working fine. Only tk2dCameras that have had Wildcard overrides added after 2.0 have this issue.

It's possible that I may be misunderstanding one of the settings as well (although I don't think I am).

I do have one other non tk2dCamera in the scene looking at the background, although there is no overlap between the two and they are both setup for separate culling. Would this cause an issue? It hasn't prior, so I'm not sure if this is the cause.

7
Support / Wildcard Camera Override change in 2.0?
« on: June 24, 2013, 11:29:46 pm »
Heya,

Just curious, were there changes to the Wildcard Override in 2.0? My tk2dCameras functioned perfectly on my tablet prior, and after the update, any camera that I have deleted the old override on and added a new wildcard to does not work properly now.

Every camera that has an old override on it still works properly (now with a blank name in the override GUI). Every new camera appears to be set at a slight -x,-y (or all the sprites are at a slight +x,+y). This happens on FitMode center, or FitMode constant at 0,0. Everything is at 0,0 right now for testing (camera and sprites).

Pages: [1]