Welcome,
Guest
. Please
login
or
register
.
April 28, 2026, 08:30:45 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Advanced Anchor and Tween Position
« previous
next »
Print
Pages: [
1
]
Author
Topic: Advanced Anchor and Tween Position (Read 3045 times)
kittikun
Newbie
Thank You
-Given: 2
-Receive: 5
Posts: 46
Advanced Anchor and Tween Position
«
on:
February 28, 2014, 12:50:31 AM »
Hi,
I am using a sprite with only the left anchor set and am moving its position Y with a tweenposition
When the tween is running, the sprite X also does change ? Is there a workaround for this ?
Thank you
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Advanced Anchor and Tween Position
«
Reply #1 on:
February 28, 2014, 07:48:58 PM »
Tweens will adjust anchors as they move. It's intentional, as otherwise nothing would move. If you are trying to move only along a single axis (Y in your case), then you can just do it in-code instead of using a tween.
widget
.
transform
.
localPosition
.
y
=
Mathf
.
Lerp
(
fromY, toY, someFactorValue
)
;
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Advanced Anchor and Tween Position