Hello Guest

Author Topic: TK2dCameraAnchor animation offset in windows phone 8!!!  (Read 6244 times)

famadori

  • Newbie
  • *
  • Posts: 12
    • View Profile
TK2dCameraAnchor animation offset in windows phone 8!!!
« on: May 25, 2014, 04:25:42 am »
I created an animation with animation with rec panel and changed the offset of x tk2dcameraanchor in unity worked perfectly, however when the application goes to the windows phone 8 does not work. Can someone help me?

arvz

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #1 on: May 25, 2014, 05:57:03 am »
Hey, I might be having the same problem as you (http://2dtoolkit.com/forum/index.php/topic,4101.0.html)

My problem is the Z-value of the object I'm anchoring keeps getting completely messed up as I play the game

famadori

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #2 on: May 25, 2014, 03:37:16 pm »
Thanks for trying to help, however my problem does not seem related to your not. It's all working perfectly, just does not work when the animation step wp8.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #3 on: May 25, 2014, 05:00:43 pm »
No idea, but this sounds like another one of those wonderful WP8 Unity bugs. You should print out the offset value to see if it changes, and see if the update function is being called.

Also make sure none of the child objects are tagged as static.

famadori

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #4 on: May 26, 2014, 12:45:26 am »
Unable to resolve. In UpdateTransform method tk2dCameraAnchor ofsset the class is changed only in unity when wp8 step towards this value does not change. This must be a bug or wp8 2dToolkit? Anyone have a suggestion how to do it?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #5 on: May 26, 2014, 10:09:38 am »
If the value doesnt change its a unity bug. In any case, the anchor code runs every frame anyway, so that implies unity isn't changing the value correctly. You could try using a tween library like hotween / gokit, it might be easier to get it to work that way.

famadori

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #6 on: May 26, 2014, 12:58:10 pm »
Thanks, I'll try.

famadori

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #7 on: May 27, 2014, 11:31:09 pm »
I'm using ITween.

iTween.MoveTo (this.volume, new Vector3 (+ this.volume.transform.position.x 1f this.volume.transform.position.y), vl);

However, for this code to work need to inactivate the anchor of the camera this way.

this.volume.GetComponent <tk2dCameraAnchor> () enabled = false.;

This is the correct way or is there another more advisable?
Thank you.

famadori

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: TK2dCameraAnchor animation offset in windows phone 8!!!
« Reply #8 on: May 28, 2014, 12:38:52 am »
Surrendered to HotWeen.

HOTween.To (this.volume.GetComponent <tk2dCameraAnchor> (), 2, new TweenParms () Prop ("AnchorOffsetPixels", new Vector2 (150, 50)).);

very simple.