Author Topic: Tween position with use of UISprite  (Read 1152 times)

Tomleung

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 44
    • View Profile
Tween position with use of UISprite
« on: March 19, 2014, 08:31:56 AM »
For the different resolution of the devices, if I want to use Tween position to play tween of the UISprite,

there is a problem that it would tween to wrong position.

How can fix it that the Tween Position would be tiled with the screen resolution?

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween position with use of UISprite
« Reply #1 on: March 20, 2014, 02:25:57 AM »
TweenPosition is always fixed. It will go from point A to point B. With different resolutions and aspect ratios, the points may not be the same. On one screen target point can be at 300x200, on another screen it can be at 400x300, for example.

If you want it to be relative, then it's up to you to pass proper values to the TweenPosition script via TweenPosition.Begin.

TL;DR: Code.