• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need Simple formula tweaked  RSS feed

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is a simple formula to move images on a screen left or right.
- The mouse is clicked on screen.
- Clicking on left half of screen gives negative value.
- Clicking on right half of screen gives positive value.

-The value newOffset is called in the renderer to create the shift in display.

Problem - If the user is as far left as can go (determined by "offsetX = Math.round(Main.newOffsetX);", the newOffset value is still modified. Likewise, clicking when the screen is as far right as it can go still modifies the newOffset value. I would appreciate help to stop this happening.

This is just the start of what im trying to do, and am aware of future issues, like different screen sizes.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!