Hi, I want to get a panel to slide in/out from left and right with info.
E.g. I slide it out using a swipe gesture, then slide it back.
I have tried lots of ways to do this (including scrolling the whole layout), but currently Im trying with a sprite.
The question is, how do I say "tween the sprite from this X position to this X position" to show it sliding nicely across the screen and stop in the center?
Do I need to hand write movement code which fires evey tick, and does the necessary maths and setting of X of sprite?
Could the bullet behavior be used for this type of animation?
Ive tried bullet, setting the right info panes angle to 270 and speed to 1000 when I detecte a left swipe, but I cant see any way of stopping it in the middle of the variable width screen. Ive tried stopping when X>=0, but X seems to have no conrespondence to the left coordinate of the window: depedning on how big I make the window X is either off screen or somewhere oncreen. Ive tried various other options, including checking to see if on screen etc and overlapping with an offset, but as I have to use crop mode with manual scaling for various different mobile screen sizes, all of these produce random results depending on the current size of teh browser window. I have no understanding of the relationship between window, layout, canvas and viewport - there does not seem to be any manual entry explaining these concepts unfortunately (e.g. canvas, window and viewport do not appear in the manual at all).
I dont even know what X refers to when you do an object-Compare X. Is it relative to the window, the layer, the viewport, the screen, or something else?