Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17116

How to animate the offset of a sprite

$
0
0

@coindrop wrote:

What I want is to make a scrolling animation that stays within the "canvas" of the sprite
So basically it should just be a sprite but instead of moving the sprite itself I want to scroll the image within the boundaries of the sprite in x or y direction. So when it moves out of the frame in one side it will move into the frame at the other side.

I might be able to create this effect using a mask somehow but I am not sure how.

In Unity we achieved this with a small script that animated the Offset of the texture to get the scrolling effect. This way we could also adjust the speed of the animation.

Hope it makes sense smile

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>