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 / [SOLVED] Help with a mask or container sprite.

Author
Message
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
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/

The author of this post has marked a post as an answer.

Go to answer

Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
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
6
Years of Service
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
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 20th Feb 2018 19:02
This post has been marked by the post author as the answer.
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
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
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: 2024-04-19 16:12:57
Your offset time is: 2024-04-19 16:12:57