Jonalogy / puttyPoodle

GA-WDI5 Project 1b: Custom build a game
1 stars 0 forks source link

Ball does not stop on the line. #1

Open Jonalogy opened 8 years ago

Jonalogy commented 8 years ago

Because Javascript does not handle computations well, ball does not drop on the line and the stopping distance away from the line varies every time.

screen shot 2016-08-30 at 9 16 18 am screen shot 2016-08-30 at 9 21 04 am screen shot 2016-08-30 at 9 16 48 am screen shot 2016-08-30 at 9 17 00 am screen shot 2016-08-30 at 9 17 13 am

Jonalogy commented 8 years ago

Problem solved (or temporarily solved) by round off to the decimal places using .toFixed(6) for velocity(vY) and gravity (gY) then converting them to numbers using Number( ) to be read by canvas path methods. screen shot 2016-08-30 at 1 41 36 pm 1

Bounce properties have been added and will be shown in later commits