1
\$\begingroup\$

I am developing a top down game similar to 8 pool billard with libgdx and box2d. How do i make a 2d ball texture look like its rolling when force is applied like this:

enter image description here

So it feels actually 3d ?

For example if this is our ball texture:

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Presumably you'd scroll the texture in the direction opposite the direction the ball is rolling? What have you tried so far, and how have the results turned out? \$\endgroup\$ – DMGregory Sep 21 at 17:37
  • \$\begingroup\$ I couldnt try anything since i have no idea where to start :/ as a cs student so far i develeoped only very simple 2d platform games :( \$\endgroup\$ – lastpeony4 Sep 21 at 20:03
  • \$\begingroup\$ @lastpeony4 - When you developed 2D platform games, you had some objects that were animated? If yes, can't you use the same method to animate your pool balls? The solution is to basically UV-scroll your ball texture, like DMGregory hinted about. \$\endgroup\$ – Daniel_1985 Sep 22 at 14:12
  • \$\begingroup\$ good question. i like to know about it that how games like miniclips pool do that. its a 2d physics but balls look they move in 3d. i think thats a 3d object there as make a spritesheet for ball rolling is not efficient. \$\endgroup\$ – virtouso Sep 23 at 21:36
  • \$\begingroup\$ I guess there are few solutions for this.first one is scroll the texture,second is sprite sheet and 3rd is using actual 3d model.still looking for some code examples though \$\endgroup\$ – lastpeony4 Sep 25 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.