Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / Help with a mask or container sprite.

Author
Message
Qugurun
3
Years of Service
User Offline
Joined: 8th Dec 2014
Location: Tyumen, Russia
Posted: 20th Feb 2018 11:16
How can I implement an enlarged image in a sprite container? Move in a sprite container?
https://www.instagram.com/qugurun/
Qugurun
3
Years of Service
User Offline
Joined: 8th Dec 2014
Location: Tyumen, Russia
Posted: 20th Feb 2018 12:57
This may sound funny, but I discovered the function SetSpriteUVScale.
Thanks to all
https://www.instagram.com/qugurun/
Bengismo
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 20th Feb 2018 14:38
SetSpriteUVScale will work but might be a bit cumbersome.

Take a look at SetSpriteScissor() which will allow you to define an area that will show a sprite inside it. You can scale the sprite and move it around but the spritw will only be viewable through the scissor window.
PHeMoX
User Offline
Joined: 9th Jan 2018
Location:
Posted: 20th Feb 2018 19:02
Yes SetSpriteScissor is the way to go.

If the container square never changes its position you might be able to use a sprite that has a square space in it that is full transparent and fix that to the screen, that way you don't need to calculate when the sprite is visible.

You would have to take advantage of the sprite depth and use some masking sprites in between in order to not make the magnified or moving picture overlap the other one.
Qugurun
3
Years of Service
User Offline
Joined: 8th Dec 2014
Location: Tyumen, Russia
Posted: 21st Feb 2018 02:12
SetSpriteUVScale,SetSpriteUVOffset


You are right, use this SetSpriteScissor is much more convenient than SetSpriteUVScale,SetSpriteUVOffset. Despite the fact that have even a little bit turned out. Thanks to all.
https://www.instagram.com/qugurun/

Login to post a reply

Server time is: 2018-10-19 04:33:02
Your offset time is: 2018-10-19 04:33:02