Relative Content

Tag Archive for javascriptgraphics

collision problem with javascript graphics

I’m attempting to create a platformer on the codehs website using javascript graphics. I did the physics and it all worked fine, but when I got the collision script from an online source, the player snaps into place at the edge of the rectangle and then falls instead of reducing the velocity. Another problem is when the player reaches the edge of a rectangle when it is above ground, instead of falling to the ground, it falls and recovers back to the last position.