Hey,
Looking for help and / or feedback from Zappar or anyone with experience trying out something similar.
I’m trying to create a reusable ‘transition’ mechanism using relativeTo. I’d need this for smooth transitions between positions that are not known until runtime. This is not very intuitive or easy to follow, but try to bear with me. My logic is the following:
OBJ is the group I want to move with my transition.
MOVER is an empty group I have in the hierarchy.
TIMELINE is a timeline that has (linked) keyframes that are set to alter MOVER.relativeToProp from [1,0] to [0,1].
A is what OBJ is relativeTo before the transition.
B is the target I want OBJ to be relativeTo after the transition.
In my script:
- Set MOVER.relativeTo( [A, B] );
- Set OBJ.relativeTo( MOVER );
- Activate TIMELINE.
- On TIMELINE complete -> Set OBJ.relativeTo( B );
The logic only works partly. The OBJ will first transition into the middle of the screen (0,0,0) where MOVER is initially set at in the hierarchy (not to A as I’d expect). After the TIMELINE finishes OBJ will correctly jump to B, but the smooth animated transition I’m after never happens.
To investigate closer, I set an label in the TIMELINE to trigger the debugger. Found out that the relativeTo and relativeToProp values seem to be correct and updating during the transition, but the position of the MOVER does not change.
Is what I’m trying to do possible in Studio? Is this a bug or am I doing something wrong?