pixel perfect collision is acting up right now, plz help.
Code
import sprites.*;
import sprites.maths.*;
import sprites.utils.*;
final double gravity = 20;
float scale;
Sprite level;
Sprite player;
Vector2D center;
int sign(float x) {return int(x/abs(x));};
void setup() {
Sprite.ALPHALEVEL = 1;
size(960, 540);
center = new Vector2D(width/2, height/2);
level = new Sprite(this, "lv1.png", 1);
double tmp = width/level.getWidth();
scale = (float) tmp;
level.setScale(scale);
level.setPos(center);
player = new Sprite(this, "player.png", 2); player.setScale(scale);
S4P.registerSprite(level);
S4P.registerSprite(player);
S4P.collisionAreasVisible = true;
noSmooth();
}
void draw() {
background(0);
S4P.drawSprites();
S4P.updateSprites(0.166);
player.setAccY(gravity);
println(player.pp_collision(level));
if (player.pp_collision(level)) {
player.setAccY(0);
player.setVelY(-player.getVelY());
}
}