T
Treecase86
Guest
Hey. I've been working on a Sonic engine, and I've encountered a problem. I use tiles as the stage background and foreground. I have separate layers for the background and collision. Problem is, Sonic passes straight through the floor. See below for code.
EDIT: I can shoerten it to just
could I not?
Code:
///Jumping
var tileGround;
tileGround = tile_layer_find(1,x,y)
if tileGround == true
{
grounded = true
}
if grounded == false
{
//if off of ground, apply gravity
ysp += grav
}
Code:
///Jumping
var grounded;
grounded = tile_layer_find(1,x,y)
if grounded == false
{
//if off of ground, apply gravity
ysp += grav
}