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

Pages: 1 2 3 [4] 5
46
Support / Camera Overrides, broken link
« on: June 04, 2014, 11:45:38 pm »
hello, im trying to understand more about camera overrides but this link is wrong

http://www.unikronsoftware.com/reference/tk2dCamera

47
Support / Re: Script Execution order and Animation Triggers
« on: May 08, 2014, 09:17:11 pm »
i changed it and it works, so happy,  thanks again for the support

48
Support / Re: Script Execution order and Animation Triggers
« on: May 08, 2014, 08:25:47 pm »
thanks , i didn't want to change it without your ok to avoid things going crazy

and well, I'm afraid i did not understand the workarounds you proposed  ???

49
Support / Re: Script Execution order and Animation Triggers
« on: May 08, 2014, 06:47:25 pm »
i think i found what could be the reason, been looking inside tk2dSpriteAnimator.cs and i found this

   public virtual void LateUpdate()
   {
      UpdateAnimation(Time.deltaTime);
   }

... thinking fast it makes sense this is the cause of the glitch cause my position update is made during Update() so the new sprite frame with the X increment inside the frame trigger is processed after i update the position , and this is wrong, should be BEFORE , in the way it is now, the X increment is set , but its not processed until the next frame!

is there any reason why the animation needs to be updated on LateUpdate ?

50
Support / Re: Script Execution order and Animation Triggers
« on: May 08, 2014, 05:49:16 pm »
it does happen like that, i am testing going frame by frame now with the unity "frame" button and i see the sprite frame is updated in one frame, but won't move, then i click again to see the next frame and  the sprite position is updated

so my AT , my CC or both are being run not in the same unity screen update than the tk2dSpriteAnimator ( i guess ) … why? :-\

51
Support / Re: Script Execution order and Animation Triggers
« on: May 08, 2014, 05:38:32 pm »
The easiest (but not necessarily the most desirable) workaround to this is to have another script that runs after AT, so CC sets the value on the frameIncX on that script and that script is guaranteed to run after that.

..to run after…what? after CC or AT? , i don't understand... how would that help? in the way i see it the problem is i need to place the command that updates position before unity updates the screen and in the same unity frame that the tk2d scripts are being run, but seems that the tk2d script that prints the sprite frame happens on the precious unity screen update and my code in the next screen update , is this really happening this way? if so… how to change it?

52
Support / Script Execution order and Animation Triggers
« on: May 07, 2014, 10:50:22 pm »
Hello !

i have set my game like this:

one script called CC ( character controller) that controls each sprite, thinking what to do on collisions , update x,y position , etc , this script also set the next script AT as delegate for tk2d Animation Triggers
then the second script called AT (Animation Triggers) that handles all tk2d animation triggers, i have set a text command system, so the frameInfo is the command, and then frameInt and frameFloat are values for this commands

there is one command , the "X" command, which means "move the sprite on the X coordinate" using frameInt value
i do this kind of movement for special cases, as there are some animations that go better if they move one or two pixels only on certain frames

so AT script its calle with the tk2d anim frame triggers, it identifies the command X , and it does not change X position directly but sets a variable of CC script called CC.frameIncX with the frameInt value
then CC script at the end of Update() , among other things, changes the sprite/gameObject transform.position by summing frameIncX (that has been set by AT)

the modification of transform.position needs to be done at the end of CC because there a some more complex stuff going on on this script, including more ways to move the sprite that are all combined to work together,  so it is better to modify the transform.position only once here, by summing all the other movements in just one increment variable and then change transform.position at once.

it works, but there is a problem, the sprite frame gets displayed on screen but the frameIncX value is not summed on this unity "screen frame", the x position is updated on the next frame, so you see the sprite glitching its position ,if the increment is just one pixel you don't appreciate it , but i have a situation i need to jump 4 pixels so that frame of the sprite gets displayed 4 pixels shifted for one unity frame time, and then goes back to its good position on the next one

i have tried to change the script execution order by moving CC and AT right after tk2dSpriteAnimator, tk2dSprite scripts,  and also before them, but no luck , no matter what i do it doesnt change anything apparently

basically i need all tk2d sprite animation scripts + my CC and AT scripts to be executed all before unity updates the screen

hope i was clear enough and you have solution

53
Showcase / Ghosts'n DJ's
« on: April 10, 2014, 10:37:10 pm »
this game is two things

1.- a tribute to the best side scroller ever
2.- a lampoon to the nowadays stupid DJ scene

http://youtu.be/ph4zqlBFJQc

would be great to hear some feedback

54
Support / Re: frame custom box colliders bug?
« on: March 08, 2014, 09:01:14 pm »
thanks for the ideas, gracias a TekuStudios también ! ;D

right now it's not a big deal cause i decided to handle colliders myself by code for the main character that was the one with the issue, , so now this problem is not delaying my project any more I won't invest more time on it , but frame colliders are such a great thing so I'm sure i will use them in some enemies , if i find more issues or if i find out any answer i will post them here.

55
Support / Re: frame custom box colliders bug?
« on: March 07, 2014, 10:03:20 am »
sorry to insist …

i would say that its a bug and because of it the sprite collection data got somehow corrupted and this could be fixed by deleting the asset and creating a new one, as i said it was working before, and right now it does not seem to follow any logic

i would love to avoid rebuilding the collection , that could cause my animations to get messed , and that is the big issue i have a lot of them and most of them with trigger events ...  :'(

56
Support / Re: frame custom box colliders bug?
« on: March 03, 2014, 09:38:32 pm »
the short answer is no , just one collider

the long answer is ….in first there was just a box collider , then testing with polygon colliders on some frames, when i clicked commit tk2d created the polygon collider , but then i removed all colliders myself from the game object, and removed all polygon colliders on the frames of the tk2d sprite collection , only box colliders, and i let tk2d to create it on the game object ...

57
Support / Re: frame custom box colliders bug?
« on: March 02, 2014, 09:18:26 am »
i found the version on the 2dTool kit unity menu , yes I'm using 2.3.3

58
Support / Re: frame custom box colliders bug?
« on: March 02, 2014, 12:18:00 am »
some more info : the "Force None" collider setting is also not working, i have the idle frame with a box collider , when i move the character , the run animation starts and i set all those run frames  to "force none" (just for testing) but what happens is the idle box collider shape keeps during all run animation …

59
Support / frame custom box colliders bug?
« on: March 02, 2014, 12:06:35 am »
i think i found a bug:

i had my sprite collection with custom box colliders , different size for each frame/sprite etc … it was working good, but i did a lot of changes on my collection , added new sprites, multiple new sprite sheets …

then i found that my game was not changing the shape of the box colliders, well it was , but only on specific frames, weird, i went to the collection messed here and there activate and deactivate them … nothing good happened, in fact then it was not changing any shapes during the game execution , just sticking to the first collider of the first frame (idle position)

after messing a while , i found that , if i change the custom box collider with a polygon collider it works, update shapes on all frames with different polygon colliders etc, i don't even need to click run to see if its gonna work cause i see in the inspector of my sprite that the polygon collider is created or removed when i click commit after adding it or removing it , but …! when it comes to box colliders, this creating/removing thing only happens with i change the sprite ID 16 (the idle position), it does not matter if the rest of sprites have box colliders , or not , if i delete the box collider of spriteID 16 and click commit , the 2DBoxCollider is removed on inspector, if i add it , it is added on inspector, its like the other sprites won't exist …

…I'm going nuts…

on a side: i also want to check the 2dtk version i have and i don't know where to check it

60
Showcase / Re: Mini Ini Mo - now available for iOS and Android.
« on: February 18, 2014, 04:37:05 pm »
interesting !

Pages: 1 2 3 [4] 5