Math problem

  • I�ve spent some time over this with no result:

    It�s for a breakout type game. I want the player to be able to "aim" wich way the ball is gonna go by trying to make the ball hit the bat towards the edges, the further away from the center of the bat the sharper ( or wider) the angle of motion gets. I have made a breakout game before in GM but the formula I used then (bat.X - ball.X +90) doesn�t seem to work, most likely because in GM 270 is down and 90 is up. All I found when searching the forum was suggestions that I change the collision polygons but I dont think that�s a good sollution.. hard to make it exactly symetrical.

    Any ideas? :)

    Thanx

  • Just tweak that formula you used in GM. Instead of +90 use -90 or 270 which is up in Construct.

    (bat.X - ball.X -90)
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • LoL!! the bouncing of walls is all messed up to. Nah, deleting the hole project.. something as simple as a breakout game isn�t worth the time it takes to figure it out. *sigh*

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)