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.

AppGameKit Classic Chat / view zoom problem

Author
Message
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 3rd Mar 2013 11:14
HI guys.

am trying to make what is similar to a book reader effect when users scroll up,down,right and left using touch screen or mouse pointer.

every thing is fine on default view mode but when I change the view zoom (at line 17), the scrolling leaves the sprite's borders.

sprite dimension: 1024x768



as well if someone knows how to add some sort of force effect when scrolling.

Please download file for full sample .

Attachments

Login to view attachments
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Mar 2013 12:43 Edited at: 3rd Mar 2013 12:45
why not use sprite physics and move the sprite with impulse instead of setviewoffset ?
and SetViewZoomMode(1) //Center
is useful.
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 3rd Mar 2013 13:28 Edited at: 3rd Mar 2013 16:47
thanks markus

I know about the sprite physics. you even can double the sprite size while keeping zoom = 1 and get the wanted result.

however, using SetViewZoom(zoom) will solved problems in general rather than specific.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Mar 2013 08:33
for the scrolling with sprite borders i need more time.

re:some sort of force effect
you mean somthing like this?

Login to post a reply

Server time is: 2024-05-03 10:29:09
Your offset time is: 2024-05-03 10:29:09